Unified · Split
| @@ -36,6 +36,7 @@ cc="gcc" · 35 unmodified lines | |||
| 36 | host_cc="gcc" | 36 | host_cc="gcc" |
| 37 | ar="ar" | 37 | ar="ar" |
| 38 | strip="strip" | 38 | strip="strip" |
| 39 | cygwin="no" | ||
| 39 | cpu=`uname -m` | 40 | cpu=`uname -m` |
| 40 | case "$cpu" in | 41 | case "$cpu" in |
| 41 | i386|i486|i586|i686|i86pc|BePC|i686-AT386) | 42 | i386|i486|i586|i686|i86pc|BePC|i686-AT386) |
| @@ -133,6 +134,8 @@ for opt do · 91 unmodified lines | |||
| 133 | ;; | 134 | ;; |
| 134 | --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86 | 135 | --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86 |
| 135 | ;; | 136 | ;; |
| 137 | --enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86 | ||
| 138 | ;; | ||
| 136 | --enable-cross) build_cross="yes" | 139 | --enable-cross) build_cross="yes" |
| 137 | ;; | 140 | ;; |
| 138 | --disable-static) disable_static="yes" | 141 | --disable-static) disable_static="yes" |
| @@ -243,7 +246,8 @@ echo " --sysroot=PREFIX prepend PREFIX to library/include paths []" · 104 unmodified lines | |||
| 243 | echo " --cc=CC use C compiler CC [$cc]" | 246 | echo " --cc=CC use C compiler CC [$cc]" |
| 244 | echo " --disable-static make libtcc.so instead of libtcc.a" | 247 | echo " --disable-static make libtcc.so instead of libtcc.a" |
| 245 | echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a" | 248 | echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a" |
| 246 | echo " --enable-mingw32 build windows version with mingw32" | 249 | echo " --enable-cygwin build windows version on windows with mingw32" |
| 250 | echo " --enable-mingw32 build windows version on linux with mingw32" | ||
| 247 | echo " --extra-cflags= extra compiler flags" | 251 | echo " --extra-cflags= extra compiler flags" |
| 248 | echo " --extra-ldflags= extra linker options" | 252 | echo " --extra-ldflags= extra linker options" |
| 249 | echo " --with-selinux use mmap instead of exec mem" | 253 | echo " --with-selinux use mmap instead of exec mem" |
| @@ -367,6 +371,12 @@ if test "$mingw32" = "yes" ; then · 117 unmodified lines | |||
| 367 | echo "CONFIG_WIN32=yes" >> config.mak | 371 | echo "CONFIG_WIN32=yes" >> config.mak |
| 368 | echo "#define CONFIG_WIN32 1" >> $TMPH | 372 | echo "#define CONFIG_WIN32 1" >> $TMPH |
| 369 | fi | 373 | fi |
| 374 | if test "$cygwin" = "yes" ; then | ||
| 375 | echo "#ifndef _WIN32" >> $TMPH | ||
| 376 | echo "#define _WIN32" >> $TMPH | ||
| 377 | echo "#endif" >> $TMPH | ||
| 378 | echo "AR=ar" >> config.mak | ||
| 379 | fi | ||
| 370 | if test "$bigendian" = "yes" ; then | 380 | if test "$bigendian" = "yes" ; then |
| 371 | echo "WORDS_BIGENDIAN=yes" >> config.mak | 381 | echo "WORDS_BIGENDIAN=yes" >> config.mak |
| 372 | echo "#define WORDS_BIGENDIAN 1" >> $TMPH | 382 | echo "#define WORDS_BIGENDIAN 1" >> $TMPH |