-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
38 lines (31 loc) · 916 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
@echo off
set MAIN_FILE=main.asm
set OUT_FILE=ralphAssembles.exe
set LIBPATH=lib
set DEBUG=1
set OBJ=out/%MAIN_FILE:.asm=.obj%
set LST=out/%MAIN_FILE:.asm=.lst%
set IN=src/%MAIN_FILE%
set OUT=%OUT_FILE%
:prepare
if %DEBUG%==0 (
set MLFLAGS=/nologo /c /Sf /Fl%LST% /coff /Sn /Zd /Zi /I %LIBPATH%
set LINKFLAGS=/DEBUG /DEBUGTYPE:COFF /NOLOGO /LIBPATH:%LIBPATH% /SUBSYSTEM:CONSOLE
) else (
set MLFLAGS=/nologo /c /Fl%LST% /coff /Sn /I %LIBPATH%
set LINKFLAGS=/NOLOGO /LIBPATH:%LIBPATH% /SUBSYSTEM:CONSOLE
)
:create_directory
if not exist "out" (
mkdir out
)
:resource
rc /fo out/resource.res resource.rc
cvtres /NOLOGO /machine:ix86 /OUT:out/resource.obj out/resource.res
:compile
ml %MLFLAGS% /Fo %OBJ% %IN%
:link
@echo Linking: %OBJ%
link %LINKFLAGS% %OBJ% /OUT:%OUT% out/resource.obj
set /p teste=""
ralphAssembles.exe