mirror of https://github.com/zeldaret/oot.git
Add Cygwin support (#594)
* Add Cygwin support * revert .gitignore changes * Add Cygwin instructions * corrections * specify dependencies in README.md
This commit is contained in:
parent
d2563b3b91
commit
be84e1f0f8
2
Makefile
2
Makefile
|
@ -21,7 +21,7 @@ MAKE = make
|
|||
CPPFLAGS += -P
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
$(error Native Windows builds not yet supported. Please use WSL, Docker or a Linux VM)
|
||||
DETECTED_OS=windows
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
|
|
20
README.md
20
README.md
|
@ -31,7 +31,25 @@ For Windows 10, install WSL and a distribution by following this
|
|||
[Windows Subsystem for Linux Installation Guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
|
||||
We recommend using Debian or Ubuntu 18.04 Linux distributions.
|
||||
|
||||
For older versions of Windows, install a Linux VM or refer to [Docker](#Docker) instructions.
|
||||
For older versions of Windows, install a Linux VM or refer to either [Docker](#Docker) or [Cygwin](#Cygwin) instructions.
|
||||
|
||||
### Cygwin
|
||||
|
||||
If you want to use Cygwin, you will need to:
|
||||
- Download and install [Git Bash](https://git-scm.com/download/win).
|
||||
- Download and install [Cygwin](https://cygwin.com).
|
||||
- [Build and install mips-linux-binutils](docs/BUILDING_BINUTILS_CYGWIN.md).
|
||||
|
||||
Once mips-linux-binutils is installed you will need to install the following packages using Cygwin's installer:
|
||||
- python3
|
||||
- libiconv
|
||||
- dos2unix
|
||||
|
||||
Now before you try to build anything, if you cloned the repository in windows you will need fix the file line endings:
|
||||
```bash
|
||||
dos2unix fixle.sh
|
||||
./fixle.sh
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
# Building mips-linux-binutils on Windows using Cygwin
|
||||
|
||||
First, you will need to install the following packages using the Cygwin installer:
|
||||
- make
|
||||
- gcc-g++
|
||||
- bison
|
||||
- flex
|
||||
- texinfo
|
||||
- binutils (Make sure to check the "Src?" checkbox since we're interested in the source code. Once the download is finished, you will find it in `/usr/src/`)
|
||||
|
||||
Create destination dir for binutils
|
||||
```bash
|
||||
sudo mkdir -p /opt/cross
|
||||
```
|
||||
Extract binutils source
|
||||
```bash
|
||||
cd /usr/src/binutils-[...].src/
|
||||
tar xjf binutils-[...].tar.bz2
|
||||
```
|
||||
|
||||
Create and enter build dir
|
||||
```bash
|
||||
mkdir build-binutils
|
||||
cd build-binutils
|
||||
```
|
||||
|
||||
Configure the build
|
||||
```bash
|
||||
../binutils-gdb/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-nls --disable-werror --disable-gdb --disable-libdecnumber --disable-readline --disable-sim
|
||||
```
|
||||
|
||||
Make and install binutils
|
||||
```bash
|
||||
make -j
|
||||
sudo make install -j
|
||||
```
|
||||
|
||||
Add the new binutils binaries to your system PATH:
|
||||
|
||||
You can do that by adding `PATH=$PATH:/opt/cross/bin` to `~/.bashrc` and then reloading `~/.bashrc`.
|
||||
|
||||
Alternatively you can edit the `Path` variable in `Edit the system environment variables`>`Environment Variables` (in which case you will need to relaunch your terminal).
|
|
@ -7,7 +7,7 @@ all: $(PROGRAMS)
|
|||
cd ZAPD && $(MAKE)
|
||||
|
||||
clean:
|
||||
$(RM) $(PROGRAMS)
|
||||
$(RM) $(PROGRAMS) $(addsuffix .exe,$(PROGRAMS))
|
||||
$(RM) ZAPD/ZAPD.out
|
||||
# Need to clean the above line later...
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
BIN
tools/mipsdisasm
BIN
tools/mipsdisasm
Binary file not shown.
Loading…
Reference in New Issue