-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
61 lines (39 loc) · 1.54 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
echo off
:::::::::::::::::::::::::::::::::::::::::::::::
::: :::
::: set MASMPATH and MASMLIBPATH below :::
::: :::
:::::::::::::::::::::::::::::::::::::::::::::::
:: make sure you add the path to ml.exe and link.exe
:: if you are using windows machine, it is normally C:\masm32\bin
:: if you are using wine on Mac, it may be under your virtual C drive.
:: one way to check that is to run cmd.exe (on Mac, run "wine cmd.exe")
:: go to the directory contains ml.exe and link.exe
:: and type "echo %cd%" to get the full path
set MASMPATH=C:\masm32\bin
:: make sure you add the path to libraries: user32.lib, kernel32.lib, gdi32.lib, masm32.lib
:: those libraries normally live in C:\masm32\lib on windows
:: if using wine on Mac, same trick as above.
set MASMLIBPATH=C:\masm32\lib
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::
::: DO NOT NEED TO MODIFY ANYTHING BELOW
:::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set path=%path%;%MASMPATH%
ml /c /coff /Cp stars.asm
if %errorlevel% neq 0 goto :error
ml /c /coff /Cp lines.asm
if %errorlevel% neq 0 goto :error
ml /c /coff /Cp trig.asm
if %errorlevel% neq 0 goto :error
ml /c /coff /Cp blit.asm
if %errorlevel% neq 0 goto :error
link /SUBSYSTEM:WINDOWS /LIBPATH:%MASMLIBPATH% blit.obj trig.obj lines.obj stars.obj libblit.obj
if %errorlevel% neq 0 goto :error
pause
echo Executable built succesfully.
goto :EOF
:error
echo Failed with error #%errorlevel%
pause