diff --git a/Koakumafile b/Koakumafile index a1012a4..696a586 100755 --- a/Koakumafile +++ b/Koakumafile @@ -14,9 +14,9 @@ proc run {project_name} { if { "$target" == "Linux" } { RunCommand "./configure --enable-opengl --enable-vulkan --without-vulkan-string-helper" } elseif { "$target" == "Win32" } { - RunCommand "./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross CC=i686-w64-mingw32-gcc" + RunCommand "./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross --target=Windows CC=i686-w64-mingw32-gcc" } elseif { "$target" == "Win64" } { - RunCommand "./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross CC=x86_64-w64-mingw32-gcc" + RunCommand "./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross --target=Windows CC=x86_64-w64-mingw32-gcc" } RunCommand "make clean" RunCommand "make -j4" diff --git a/configure b/configure index 0eaa3e9..9ce7c34 100755 --- a/configure +++ b/configure @@ -2,6 +2,8 @@ # $Id$ FLAGS="" +target="" + feat_cross=false feat_stb_image=true feat_stb_truetype=false @@ -36,6 +38,9 @@ for i in $@; do --cross) feat_cross=true ;; + --target=) + target="`echo $i | cut -d= -f2`" + ;; --enable-*|--disable-*) if [ "`echo $i | cut -d- -f3`" = "enable" ]; then eval feat_`echo $i | cut -d- -f4- | tr - _`=true @@ -60,6 +65,10 @@ if $feat_cross; then FLAGS="$FLAGS -Dcross_build" fi +if [ ! "x$target" = "x" ]; then + FLAGS="$FLAGS -Dtarget=$target" +fi + if [ ! "x$CC" = "x" ]; then FLAGS="$FLAGS -Dcc=$CC" fi