summaryrefslogtreecommitdiff
path: root/w32/subproc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-04-25 20:41:53 +0300
committerEli Zaretskii <eliz@gnu.org>2013-04-25 20:41:53 +0300
commitf3a4b4ce6f16830b0f2c42b14fe6f955d49eb274 (patch)
tree929e96b145c0979b4f21b19d4ce232b9c15f317c /w32/subproc
parent50e2cb1b1ae989407ce0f34498776bb0175b3358 (diff)
downloadgunmake-f3a4b4ce6f16830b0f2c42b14fe6f955d49eb274.tar.gz
Improve MS-Windows build scripts.
build_w32.bat: Improve. Remove 'setlocal', as it isn't supported on Windows 9X. Add --help and usage instructions. Support both debug and optimized builds with GCC under --debug. If building out of Git repo, always produce config.h, and edit gmk-default.scm into gmk-default.h. w32/subproc/build.bat: Support debug and optimized builds with GCC.
Diffstat (limited to 'w32/subproc')
-rw-r--r--w32/subproc/build.bat10
1 files changed, 5 insertions, 5 deletions
diff --git a/w32/subproc/build.bat b/w32/subproc/build.bat
index c27ecfb..ecd2ab7 100644
--- a/w32/subproc/build.bat
+++ b/w32/subproc/build.bat
@@ -1,4 +1,4 @@
-@if "%1" == "gcc" GoTo GCCBuild
+@if "%COMPILER%" == "gcc" GoTo GCCBuild
if not exist .\WinDebug\nul mkdir .\WinDebug
cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c
cl.exe /nologo /MT /W4 /GX /Z7 /YX /Od /I .. /I . /I ../include /I ../.. /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c
@@ -11,13 +11,13 @@ cl.exe /nologo /MT /W4 /GX /YX /O2 /I .. /I . /I ../include /I ../.. /D WIN32 /D
lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj
GoTo BuildEnd
:GCCBuild
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c misc.c -o ../../w32_misc.o
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c sub_proc.c -o ../../sub_proc.o
-gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I.. -I. -I../include -I../.. -DWINDOWS32 -c w32err.c -o ../../w32err.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c misc.c -o ../../w32_misc.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c sub_proc.c -o ../../sub_proc.o
+gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I.. -I. -I../include -I../.. -DWINDOWS32 -c w32err.c -o ../../w32err.o
:BuildEnd
@echo off
-rem Copyright (C) 1996-2012 Free Software Foundation, Inc.
+rem Copyright (C) 1996-2013 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under