Revert "drop MSYS build support"

This reverts commit d930f41d7e51897ce8b529e4546c4d5dead7ce3f.

Turns out the avian-pack project really needs MSYS support, so I'm
reverting this.
This commit is contained in:
Joel Dice 2016-04-26 19:06:25 -06:00
parent 954902019b
commit b999772838
2 changed files with 34 additions and 17 deletions

View File

@ -21,6 +21,12 @@ to use forward slashes in the path.
$ make $ make
$ build/macosx-x86_64/avian -cp build/macosx-x86_64/test Hello $ build/macosx-x86_64/avian -cp build/macosx-x86_64/test Hello
#### on Windows (MSYS):
$ git clone git@github.com:ReadyTalk/win64.git ../win64
$ export JAVA_HOME="C:/Program Files/Java/jdk1.7.0_45"
$ make
$ build/windows-x86_64/avian -cp build/windows-x86_64/test Hello
#### on Windows (Cygwin): #### on Windows (Cygwin):
$ git clone git@github.com:ReadyTalk/win64.git ../win64 $ git clone git@github.com:ReadyTalk/win64.git ../win64
$ export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_45" $ export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_45"
@ -174,7 +180,17 @@ devices. See [here](https://github.com/ReadyTalk/hello-ios) for an
example of an Xcode project for iOS which uses Avian. example of an Xcode project for iOS which uses Avian.
If you are compiling for Windows, you may either cross-compile using If you are compiling for Windows, you may either cross-compile using
MinGW or build natively on Windows under Cygwin. MinGW or build natively on Windows under MSYS or Cygwin.
#### Installing MSYS:
__1.__ Download and install the current MinGW and MSYS packages from
mingw.org, selecting the C and C++ compilers when prompted. Use the
post-install script to create the filesystem link to the compiler.
__2.__ Download GNU Make 3.81 from the MSYS download page
(make-3.81-MSYS-1.0.11-2.tar.bz2) and extract the tar file into
_e.g. c:/msys/1.0_.
#### Installing Cygwin: #### Installing Cygwin:

View File

@ -17,6 +17,7 @@ build-arch := $(shell uname -m \
build-platform := \ build-platform := \
$(shell uname -s | tr [:upper:] [:lower:] \ $(shell uname -s | tr [:upper:] [:lower:] \
| sed \ | sed \
-e 's/^mingw32.*$$/mingw32/' \
-e 's/^cygwin.*$$/cygwin/' \ -e 's/^cygwin.*$$/cygwin/' \
-e 's/^darwin.*$$/macosx/') -e 's/^darwin.*$$/macosx/')
@ -24,7 +25,7 @@ arch = $(build-arch)
target-arch = $(arch) target-arch = $(arch)
bootimage-platform = \ bootimage-platform = \
$(subst cygwin,windows,$(build-platform)) $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))
platform = $(bootimage-platform) platform = $(bootimage-platform)
@ -148,7 +149,7 @@ windows-path = echo
path-separator = : path-separator = :
ifneq (,$(filter cygwin,$(build-platform))) ifneq (,$(filter mingw32 cygwin,$(build-platform)))
path-separator = ; path-separator = ;
endif endif
@ -415,6 +416,14 @@ endif
input = List input = List
ifeq ($(use-clang),true)
build-cxx = clang++ -std=c++11
build-cc = clang
else
build-cxx = g++
build-cc = gcc
endif
mflag = mflag =
ifneq ($(kernel),darwin) ifneq ($(kernel),darwin)
ifeq ($(arch),i386) ifeq ($(arch),i386)
@ -425,18 +434,10 @@ ifneq ($(kernel),darwin)
endif endif
endif endif
ifeq ($(use-clang),true)
build-cxx = clang++ -std=c++11
build-cc = clang
else
build-cxx = g++ $(mflag)
build-cc = gcc $(mflag)
endif
target-format = elf target-format = elf
cxx = $(build-cxx) cxx = $(build-cxx) $(mflag)
cc = $(build-cc) cc = $(build-cc) $(mflag)
ar = ar ar = ar
ranlib = ranlib ranlib = ranlib
@ -682,15 +683,15 @@ ifeq ($(platform),android)
build-cflags = $(common-cflags) -I$(src) build-cflags = $(common-cflags) -I$(src)
build-lflags = -lz -lpthread build-lflags = -lz -lpthread
ifeq ($(subst cygwin,windows,$(build-platform)),windows) ifeq ($(subst cygwin,windows,$(subst mingw32,windows,$(build-platform))),windows)
toolchain-host-platform = $(subst cygwin,windows,$(build-platform)) toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))
build-system = windows build-system = windows
build-cxx = i686-w64-mingw32-g++ build-cxx = i686-w64-mingw32-g++
build-cc = i686-w64-mingw32-gcc build-cc = i686-w64-mingw32-gcc
sysroot = "$$(cygpath -w "$(ndk)/platforms/android-$(android-version)/arch-arm")" sysroot = "$$(cygpath -w "$(ndk)/platforms/android-$(android-version)/arch-arm")"
build-cflags += "-I$(JAVA_HOME)/include/win32" build-cflags += "-I$(JAVA_HOME)/include/win32"
else else
toolchain-host-platform = $(subst cygwin,windows,$(build-platform))-* toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))-*
sysroot = $(ndk)/platforms/android-$(android-version)/arch-arm sysroot = $(ndk)/platforms/android-$(android-version)/arch-arm
build-cflags += "-I$(JAVA_HOME)/include/linux" build-cflags += "-I$(JAVA_HOME)/include/linux"
build-lflags += -ldl build-lflags += -ldl
@ -918,7 +919,7 @@ ifeq ($(platform),windows)
cflags = -I$(inc) $(common-cflags) -DWINVER=0x0500 -U__STRICT_ANSI__ cflags = -I$(inc) $(common-cflags) -DWINVER=0x0500 -U__STRICT_ANSI__
ifeq (,$(filter cygwin,$(build-platform))) ifeq (,$(filter mingw32 cygwin,$(build-platform)))
openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive
prefix := $(shell i686-w64-mingw32-gcc --version >/dev/null 2>&1 \ prefix := $(shell i686-w64-mingw32-gcc --version >/dev/null 2>&1 \
&& echo i686-w64-mingw32- || echo x86_64-w64-mingw32-) && echo i686-w64-mingw32- || echo x86_64-w64-mingw32-)