-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.bat
39 lines (28 loc) · 931 Bytes
/
make.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@rem Turn off echoing of commands.
@echo off
rem Make sure local variables don't spill into the global environment.
setlocal EnableExtensions
rem Make sure we're in the src directory.
pushd "%~dp0src"
rem Treat the first parameter to this batch script as a target.
set target=%1
rem If a target is specified, call the subroutine
if "%target%"=="" (call :build) else (call :%target%)
goto :end
:build
rem Compiler flags:
rem /nologo Don't print tedious MS logo stuff in the beginning
rem /DEBUG Compile in debug mode.
rem /Z7 Create debug symbols as .pdb files
rem /TC Compile as C, not C++
set CFLAGS=/nologo /DEBUG /Z7 /TC
rem Compile the sources.
cl %CFLAGS% main.c cpu.c gfx.c interconnect.c util.c
exit /B
:clean
rem Delete all intermediate files.
del *.obj *.exe *.o *.a *.lib *.pdb *.ilk
exit /B
:end
rem Restore previous directory.
popd