forked from PlummersSoftwareLLC/TinyRetroPad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
38 lines (31 loc) · 871 Bytes
/
Copy pathbuild.bat
File metadata and controls
38 lines (31 loc) · 871 Bytes
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
@echo off
setlocal
rem Build TRPad with Microsoft MASM and LINK.EXE.
set "SOURCE=trpad.asm"
set "OBJECT=trpad.obj"
set "OUTPUT=trpad.exe"
set "MASM_INCLUDE=C:\masm32\include"
set "SDK_LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.20348.0\um\x86"
ml /nologo /c /coff /Cp /I"%MASM_INCLUDE%" "%SOURCE%"
if errorlevel 1 goto :assemble_failed
link /nologo ^
/OUT:"%OUTPUT%" ^
/ENTRY:MainEntry ^
/SUBSYSTEM:WINDOWS ^
/MACHINE:X86 ^
/INCREMENTAL:NO ^
/OPT:REF ^
/OPT:ICF ^
/LIBPATH:"%SDK_LIB%" ^
"%OBJECT%" ^
kernel32.lib user32.lib shell32.lib comdlg32.lib gdi32.lib
if errorlevel 1 goto :link_failed
del /q "%OBJECT%" 2>nul
echo Built %OUTPUT%
exit /b 0
:assemble_failed
echo Assembly failed. No executable was produced.
exit /b 1
:link_failed
echo Link failed. Keeping %OBJECT% for diagnosis.
exit /b 1