forked from volkertb/boxv9x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
104 lines (80 loc) · 2.8 KB
/
makefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
OBJS = dibthunk.obj dibcall.obj enable.obj init.obj palette.obj &
scrsw.obj sswhook.obj modes.obj boxv.obj
INCS = -I$(%WATCOM)\h\win -Iddk
# Define HWBLT if BitBlt can be accelerated.
#FLAGS = -DHWBLT
# Set DBGPRINT to add debug printf logging.
# DBGPRINT = 1
!ifdef DBGPRINT
FLAGS += -DDBGPRINT
OBJS += dbgprint.obj
# Need this to work with pre-made boxv9x.lnk
DBGFILE = file dbgprint.obj
!else
DBGFILE =
!endif
boxvmini.drv : $(OBJS) display.res dibeng.lib boxv9x.lnk
wlink op quiet, start=DriverInit_ disable 2055 @boxv9x.lnk $(DBGFILE)
wrc -q display.res $@
# Linker script
boxv9x.lnk : boxv9x.def
ms2wlink $(OBJS),boxvmini.drv,boxvmini.map,dibeng.lib clibs.lib,boxv9x.def > boxv9x.lnk
# Object files
boxv.obj : boxv.c .autodepend
wcc -q -wx -s -zu -zls -3 $(FLAGS) $<
dbgprint.obj : dbgprint.c .autodepend
wcc -q -wx -s -zu -zls -3 $(FLAGS) $<
dibcall.obj : dibcall.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
dibthunk.obj : dibthunk.asm
wasm -q $(FLAGS) $<
enable.obj : enable.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
init.obj : init.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
palette.obj : palette.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
sswhook.obj : sswhook.asm
wasm -q $(FLAGS) $<
modes.obj : modes.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
scrsw.obj : scrsw.c .autodepend
wcc -q -wx -s -zu -zls -3 -zW $(INCS) $(FLAGS) $<
# Resources
display.res : res/display.rc res/colortab.bin res/config.bin res/fonts.bin res/fonts120.bin .autodepend
wrc -q -r -ad -bt=windows -fo=$@ -Ires -I$(%WATCOM)/h/win res/display.rc
res/colortab.bin : res/colortab.c
wcc -q $(INCS) $<
wlink op quiet disable 1014, 1023 name $@ sys dos output raw file colortab.obj
res/config.bin : res/config.c
wcc -q $(INCS) $<
wlink op quiet disable 1014, 1023 name $@ sys dos output raw file config.obj
res/fonts.bin : res/fonts.c .autodepend
wcc -q $(INCS) $<
wlink op quiet disable 1014, 1023 name $@ sys dos output raw file fonts.obj
res/fonts120.bin : res/fonts120.c .autodepend
wcc -q $(INCS) $<
wlink op quiet disable 1014, 1023 name $@ sys dos output raw file fonts120.obj
# Libraries
dibeng.lib : ddk/dibeng.lbc
wlib -b -q -n -fo -ii @$< $@
# Cleanup
clean : .symbolic
rm *.obj
rm *.err
rm *.lib
rm *.drv
rm *.map
rm *.res
rm *.img
rm res/*.obj
rm res/*.bin
image : .symbolic boxv9x.img
# Create a 1.44MB distribution floppy image.
# NB: The mkimage tool is not supplied.
boxv9x.img : boxvmini.drv boxv9x.inf readme.txt
if not exist dist mkdir dist
copy boxvmini.drv dist
copy boxv9x.inf dist
copy readme.txt dist
mkimage -l BOXV9X -o boxv9x.img dist