mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-15 05:20:06 +08:00
Add --enable-cygwin option to build on windows with cygwin+mingw32
This commit is contained in:
parent
c5d3ce684a
commit
94e72b16e7
12
configure
vendored
12
configure
vendored
@ -36,6 +36,7 @@ cc="gcc"
|
|||||||
host_cc="gcc"
|
host_cc="gcc"
|
||||||
ar="ar"
|
ar="ar"
|
||||||
strip="strip"
|
strip="strip"
|
||||||
|
cygwin="no"
|
||||||
cpu=`uname -m`
|
cpu=`uname -m`
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
i386|i486|i586|i686|i86pc|BePC|i686-AT386)
|
i386|i486|i586|i686|i86pc|BePC|i686-AT386)
|
||||||
@ -133,6 +134,8 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
|
--enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
|
||||||
;;
|
;;
|
||||||
|
--enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86
|
||||||
|
;;
|
||||||
--enable-cross) build_cross="yes"
|
--enable-cross) build_cross="yes"
|
||||||
;;
|
;;
|
||||||
--disable-static) disable_static="yes"
|
--disable-static) disable_static="yes"
|
||||||
@ -243,7 +246,8 @@ echo " --sysroot=PREFIX prepend PREFIX to library/include paths []"
|
|||||||
echo " --cc=CC use C compiler CC [$cc]"
|
echo " --cc=CC use C compiler CC [$cc]"
|
||||||
echo " --disable-static make libtcc.so instead of libtcc.a"
|
echo " --disable-static make libtcc.so instead of libtcc.a"
|
||||||
echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a"
|
echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a"
|
||||||
echo " --enable-mingw32 build windows version with mingw32"
|
echo " --enable-cygwin build windows version on windows with mingw32"
|
||||||
|
echo " --enable-mingw32 build windows version on linux with mingw32"
|
||||||
echo " --extra-cflags= extra compiler flags"
|
echo " --extra-cflags= extra compiler flags"
|
||||||
echo " --extra-ldflags= extra linker options"
|
echo " --extra-ldflags= extra linker options"
|
||||||
echo " --with-selinux use mmap instead of exec mem"
|
echo " --with-selinux use mmap instead of exec mem"
|
||||||
@ -367,6 +371,12 @@ if test "$mingw32" = "yes" ; then
|
|||||||
echo "CONFIG_WIN32=yes" >> config.mak
|
echo "CONFIG_WIN32=yes" >> config.mak
|
||||||
echo "#define CONFIG_WIN32 1" >> $TMPH
|
echo "#define CONFIG_WIN32 1" >> $TMPH
|
||||||
fi
|
fi
|
||||||
|
if test "$cygwin" = "yes" ; then
|
||||||
|
echo "#ifndef _WIN32" >> $TMPH
|
||||||
|
echo "#define _WIN32" >> $TMPH
|
||||||
|
echo "#endif" >> $TMPH
|
||||||
|
echo "AR=ar" >> config.mak
|
||||||
|
fi
|
||||||
if test "$bigendian" = "yes" ; then
|
if test "$bigendian" = "yes" ; then
|
||||||
echo "WORDS_BIGENDIAN=yes" >> config.mak
|
echo "WORDS_BIGENDIAN=yes" >> config.mak
|
||||||
echo "#define WORDS_BIGENDIAN 1" >> $TMPH
|
echo "#define WORDS_BIGENDIAN 1" >> $TMPH
|
||||||
|
Loading…
Reference in New Issue
Block a user