\r
:FoundMSVC\r
set OUTDIR=.\WinRel\r
+set LNKOUT=./WinRel\r
set "OPTS=/O2 /D NDEBUG"\r
set LINKOPTS=\r
if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug\r
+if "%DEBUG%" == "Y" set LNKOUT=./WinDebug\r
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"\r
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG\r
if "%MAINT%" == "Y" set "OPTS=%OPTS% /D MAKE_MAINTAINER_MODE"\r
\r
:FindGcc\r
set OUTDIR=.\GccRel\r
+set LNKOUT=./GccRel\r
set OPTS=-O2\r
if "%DEBUG%" == "Y" set OPTS=-O0\r
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug\r
+if "%DEBUG%" == "Y" set LNKOUT=./GccDebug\r
if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"\r
:: Show the compiler version that we found\r
echo.\r
\r
if exist %OUTDIR%\link.sc del %OUTDIR%\link.sc\r
\r
-call :Compile src\ar\r
-call :Compile src\arscan\r
-call :Compile src\commands\r
-call :Compile src\default\r
-call :Compile src\dir\r
-call :Compile src\expand\r
-call :Compile src\file\r
-call :Compile src\function\r
-call :Compile src\getopt\r
-call :Compile src\getopt1\r
-call :Compile src\guile GUILE\r
-call :Compile src\hash\r
-call :Compile src\implicit\r
-call :Compile src\job\r
-call :Compile src\load\r
-call :Compile src\loadapi\r
-call :Compile src\main GUILE\r
-call :Compile src\misc\r
-call :Compile src\output\r
-call :Compile src\read\r
-call :Compile src\remake\r
-call :Compile src\remote-stub\r
-call :Compile src\rule\r
-call :Compile src\signame\r
-call :Compile src\strcache\r
-call :Compile src\variable\r
-call :Compile src\version\r
-call :Compile src\vpath\r
-call :Compile src\w32\pathstuff\r
-call :Compile src\w32\w32os\r
-call :Compile src\w32\compat\posixfcn\r
-call :Compile src\w32\subproc\misc\r
-call :Compile src\w32\subproc\sub_proc\r
-call :Compile src\w32\subproc\w32err\r
-call :Compile lib\fnmatch\r
-call :Compile lib\glob\r
-call :Compile lib\getloadavg\r
+call :Compile src/ar\r
+call :Compile src/arscan\r
+call :Compile src/commands\r
+call :Compile src/default\r
+call :Compile src/dir\r
+call :Compile src/expand\r
+call :Compile src/file\r
+call :Compile src/function\r
+call :Compile src/getopt\r
+call :Compile src/getopt1\r
+call :Compile src/guile GUILE\r
+call :Compile src/hash\r
+call :Compile src/implicit\r
+call :Compile src/job\r
+call :Compile src/load\r
+call :Compile src/loadapi\r
+call :Compile src/main GUILE\r
+call :Compile src/misc\r
+call :Compile src/output\r
+call :Compile src/read\r
+call :Compile src/remake\r
+call :Compile src/remote-stub\r
+call :Compile src/rule\r
+call :Compile src/signame\r
+call :Compile src/strcache\r
+call :Compile src/variable\r
+call :Compile src/version\r
+call :Compile src/vpath\r
+call :Compile src/w32/pathstuff\r
+call :Compile src/w32/w32os\r
+call :Compile src/w32/compat/posixfcn\r
+call :Compile src/w32/subproc/misc\r
+call :Compile src/w32/subproc/sub_proc\r
+call :Compile src/w32/subproc/w32err\r
+call :Compile lib/fnmatch\r
+call :Compile lib/glob\r
+call :Compile lib/getloadavg\r
\r
if not "%COMPILER%" == "gcc" call :Compile src\w32\compat\dirent\r
\r
::\r
\r
:Compile\r
-echo %OUTDIR%\%1.%O% >>%OUTDIR%\link.sc\r
+echo %LNKOUT%/%1.%O% >>%OUTDIR%\link.sc\r
set EXTRAS=\r
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"\r
if exist "%OUTDIR%\%1.%O%" del "%OUTDIR%\%1.%O%"\r
:GccCompile\r
:: GCC Compile\r
echo on\r
-%COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%\%1.%O% -c %1.c\r
+%COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c\r
@echo off\r
\r
:CompileDone\r
goto :EOF\r
\r
:Link\r
-echo Linking %OUTDIR%/%MAKE%.exe\r
+echo.\r
+echo Linking %LNKOUT%/%MAKE%.exe\r
if "%COMPILER%" == "gcc" goto GccLink\r
\r
:: MSVC Link\r
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc\r
echo on\r
-link.exe /NOLOGO /SUBSYSTEM:console /PDB:%OUTDIR%\%MAKE%.pdb %LINKOPTS% /OUT:%OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc\r
+link.exe /NOLOGO /SUBSYSTEM:console /PDB:%LNKOUT%\%MAKE%.pdb %LINKOPTS% /OUT:%LNKOUT%\%MAKE%.exe @%LNKOUT%\link.sc\r
@echo off\r
goto :EOF\r
\r
:: GCC Link\r
echo on\r
echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc\r
-%COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a\r
+%COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc -Wl,--out-implib=%LNKOUT%/libgnumake-1.dll.a\r
@echo off\r
goto :EOF\r
\r
set O=\r
set OPTS=\r
set OUTDIR=\r
+set LNKOUT=\r
set PKGMSC=\r
set VSVARS=\r
goto :EOF\r