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