-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
171 lines (132 loc) · 3.5 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Enhanced DR-DOS master Makefile for OpenWatcom WMAKE
# to build DRBIO.SYS, DRDOS.SYS and COMMAND.COM
#
# (c)opyright 2024 Bernd Boeckmann
#
# This makefile runs the make scripts of the individual components and
# puts the generated binaries into the bin directory
# By default it generates a compressed single-file kernel KERNEL.SYS.
# This may be altered via the make variables SINGLEFILE and COMPRESSED
#
# Call wmake SINGLEFILE=0 to generate a dual-file kernel consisting
# of DRBIO.SYS and DRDOS.SYS.
.erase
!include platform.mak
!ifndef SINGLEFILE
SINGLEFILE=1
!endif
!ifndef COMPRESSED
COMPRESSED=1
!endif
!ifeq SINGLEFILE 1
WMAKE_FLAGS += SINGLEFILE=1
!else
WMAKE_FLAGS += SINGLEFILE=0
!endif
!ifeq COMPRESSED 0
WMAKE_FLAGS += COMPRESSED=0
COMPKERN_FLAGS += uncompressed
!endif
FILES += bin/country.sys bin/command.com
!ifeq SINGLEFILE 1
all: bin/kernel.sys $(FILES) .SYMBOLIC
!else
all: bin/drbio.sys bin/drdos.sys $(FILES) .SYMBOLIC
!endif
WMAKE_FLAGS += VERSION=$(VERSION) GIT_REV=$(GIT_REV)
image: all .SYMBOLIC
cd image
sh mkimage.sh singlefile
cd ..
bin/kernel.sys: drbio/bin/drbio.bin drdos/bin/drdos.bin
$(COMPKERN) drbio$(SEP)bin$(SEP)drbio.bin drdos$(SEP)bin$(SEP)drdos.bin bin$(SEP)kernel.sys $(COMPKERN_FLAGS)
bin/drbio.sys: drbio/bin/drbio.sys
$(CP) drbio$(SEP)bin$(SEP)drbio.sys bin$(SEP)drbio.sys
bin/drdos.sys: drdos/bin/drdos.sys
$(CP) drdos$(SEP)bin$(SEP)drdos.sys bin$(SEP)drdos.sys
bin/country.sys: drdos/bin/country.sys
$(CP) drdos$(SEP)bin$(SEP)country.sys bin$(SEP)country.sys
bin/command.com: command/bin/command.com
$(CP) command$(SEP)bin$(SEP)command.com bin$(SEP)command.com
bin/license:
mkdir bin$(SEP)license
bin/license/license.htm: bin/license license.htm
$(CP) license.htm bin$(SEP)license$(SEP)license.htm
drbio/bin/drbio.sys: .ALWAYS .RECHECK
cd drbio
$(WMAKE) $(WMAKE_FLAGS) $(BIO_FLAGS)
cd ..
drdos/bin/drdos.sys: .ALWAYS .RECHECK
cd drdos
$(WMAKE) $(WMAKE_FLAGS)
cd ..
drdos/bin/country.sys: .ALWAYS .RECHECK
cd drdos
@$(WMAKE) $(WMAKE_FLAGS) bin/country.sys
cd ..
drbio/bin/drbio.bin: .ALWAYS .RECHECK
cd drbio
$(WMAKE) $(WMAKE_FLAGS) $(BIO_FLAGS) bin/drbio.bin
cd ..
drdos/bin/drdos.bin: .ALWAYS .RECHECK
cd drdos
$(WMAKE) $(WMAKE_FLAGS) bin/drdos.bin
cd ..
command/bin/command.com: .ALWAYS .RECHECK
cd command
$(WMAKE)
cd ..
# SvarDOS .svp package
kernledr.svp: pkg/kernel.sys pkg/bin/country.sys pkg/doc/kernledr/license.htm pkg/appinfo/kernledr.lsm
cd pkg
zip -9rkDX ..$(SEP)$@ *
cd ..
pkg/kernel.sys: pkg bin/kernel.sys
$(CP) $]@ $@
pkg:
mkdir $@
pkg/bin: pkg
mkdir $@
pkg/bin/country.sys: pkg/bin bin/country.sys
$(CP) $]@ $@
pkg/appinfo: pkg
mkdir $@
pkg/appinfo/kernledr.lsm: pkg/appinfo .ALWAYS
%create $@
%append $@ version: $(VERSION)
%append $@ description: Enhanced DR-DOS kernel
%append $@ warn: EDR kernel installed. Please reboot to activate it.
pkg/doc: pkg
mkdir $@
pkg/doc/kernledr: pkg/doc
mkdir $@
pkg/doc/kernledr/license.htm: pkg/doc/kernledr license.htm
$(CP) $]@ $@
clean: .SYMBOLIC
@cd drbio
@$(WMAKE) clean
@cd ..
@cd drdos
@$(WMAKE) clean
@cd ..
@cd command
@$(WMAKE) clean
@cd ..
@rm -f bin/drbio.sys
@rm -f bin/DRBIO.SYS
@rm -f bin/drdos.sys
@rm -f bin/DRDOS.SYS
@rm -f bin/kernel.sys
@rm -f bin/KERNEL.SYS
@rm -f bin/country.sys
@rm -f bin/COUNTRY.SYS
@rm -f bin/command.com
@rm -f bin/COMMAND.COM
@rm -f bin/license/license.htm
@rm -f image/edrdos.img
# SvarDOS package
@rm -f pkg/kernel.sys
@rm -f pkg/bin/country.sys
@rm -f pkg/doc/license.htm
@rm -f pkg/appinfo/kernledr.lsm
@rm -f kernledr.svp