-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.bat
54 lines (43 loc) · 983 Bytes
/
build.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
@echo off
set TCLIB=C:\TC\LIB\
echo Building HIMEM exe file
if %1 == "DEBUG" goto debug
rem settings for debug build
:debug
set TASMDEBUG=/zi
set LINKDEBUG=/v
set TCDEBUG=-M
goto build
rem settings for release build
:release
set TASMDEBUG=
set LINKDEBUG=
set TCDEBUG=
:build
echo deleting old file..
del *.map
del *.obj
del *.bak
del *.exe
tcc -c -mt %TCDEBUG% main.cpp
tcc -c -mt %TCDEBUG% cpuid.cpp
tcc -c -mt %TCDEBUG% xmsapi.cpp
tcc -c -mt %TCDEBUG% handler.cpp
tasm xmm386.asm
tasm driver.asm
if "%1" == "DRIVER" goto linkdrv
:link
echo Linking standalone version...
tlink /3 %LINKDEBUG% handler.obj main.obj cpuid.obj xmsapi.obj xmm386.obj c:\tc\lib\c0t.obj, himem.exe, himem.map, c:\tc\lib\cs.lib
if exist himem.exe goto clean
goto end
:linkdrv
echo Linking driver version...
rem Strip data from handler...
tlink /t /3 driver.obj xmm386.obj handler.obj, himem.sys, himem.map, c:\tc\lib\cs.lib
if exist himem.sys goto clean
goto end
:clean
del *.obj
:end
echo done.