-
Notifications
You must be signed in to change notification settings - Fork 49
/
cab.mak
241 lines (221 loc) · 7.67 KB
/
cab.mak
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
############################################################################
# CAB dist
TSR_SRC = \
$(wildcard $(srcdir)/advance/tsr/*.asm) \
$(wildcard $(srcdir)/advance/tsr/*.c) \
$(wildcard $(srcdir)/advance/tsr/*.h)
DOS16_SRC = \
$(wildcard $(srcdir)/advance/dos/pci.*) \
$(wildcard $(srcdir)/advance/dos/map.*) \
$(wildcard $(srcdir)/advance/dos/compil.h)
VBE_SRC = \
$(srcdir)/advance/vbe/makefile \
$(wildcard $(srcdir)/advance/vbe/*.asm) \
$(wildcard $(srcdir)/advance/vbe/*.c) \
$(wildcard $(srcdir)/advance/vbe/*.h)
VBE32_SRC = \
$(srcdir)/advance/vbe32/makefile \
$(wildcard $(srcdir)/advance/vbe32/*.c) \
$(wildcard $(srcdir)/advance/vbe32/*.h)
VBEW_SRC = \
$(srcdir)/advance/vbew/makefile \
$(wildcard $(srcdir)/advance/vbew/*.c) \
$(wildcard $(srcdir)/advance/vbew/*.h)
VGA_SRC = \
$(srcdir)/advance/vga/makefile \
$(wildcard $(srcdir)/advance/vga/*.asm) \
$(wildcard $(srcdir)/advance/vga/*.c) \
$(wildcard $(srcdir)/advance/vga/*.h)
OFF_SRC = \
$(srcdir)/advance/off/makefile \
$(wildcard $(srcdir)/advance/off/*.c) \
$(wildcard $(srcdir)/advance/off/*.h)
PORTIO_SRC = \
$(srcdir)/advance/portio/makefile \
$(wildcard $(srcdir)/advance/portio/*.c) \
$(wildcard $(srcdir)/advance/portio/*.h)
VIDEO_SRC = \
$(srcdir)/advance/video/makefile \
$(wildcard $(srcdir)/advance/video/*.c) \
$(wildcard $(srcdir)/advance/video/*.h)
VIDEOWIN_SRC = \
$(srcdir)/advance/videow/makefile \
$(wildcard $(srcdir)/advance/videow/*.c) \
$(wildcard $(srcdir)/advance/videow/*.h)
CAB_ROOT_SRC = \
$(srcdir)/COPYING \
$(CONF_SRC)
CAB_ADVANCE_SRC = \
$(srcdir)/advance/advance.mak \
$(srcdir)/advance/version.mak \
$(srcdir)/advance/cab.mak \
$(srcdir)/advance/d2.mak
CAB_DOC_SRC = \
$(srcdir)/doc/advdev.d \
$(srcdir)/doc/vbe.d \
$(srcdir)/doc/vbe32.d \
$(srcdir)/doc/vga.d \
$(srcdir)/doc/video.d \
$(srcdir)/doc/off.d \
$(srcdir)/doc/portio.d \
$(srcdir)/doc/videow.d \
$(srcdir)/doc/svgawin.d \
$(srcdir)/doc/carddos.d \
$(srcdir)/doc/cardwin.d \
$(srcdir)/doc/histcab.d \
$(srcdir)/doc/readcab.d \
$(srcdir)/doc/relecab.d
CAB_DOC_BIN += \
$(DOCOBJ)/advdev.txt \
$(DOCOBJ)/histcab.txt \
$(DOCOBJ)/readcab.txt \
$(DOCOBJ)/relecab.txt \
$(DOCOBJ)/advv.txt \
$(DOCOBJ)/advdev.html \
$(DOCOBJ)/histcab.html \
$(DOCOBJ)/readcab.html \
$(DOCOBJ)/relecab.html \
$(DOCOBJ)/advv.html
ifeq ($(CONF_SYSTEM),dos)
CAB_DOC_BIN += \
$(DOCOBJ)/vbe.txt \
$(DOCOBJ)/vbe32.txt \
$(DOCOBJ)/vga.txt \
$(DOCOBJ)/video.txt \
$(DOCOBJ)/off.txt \
$(DOCOBJ)/portio.txt \
$(DOCOBJ)/carddos.txt \
$(DOCOBJ)/vbe.html \
$(DOCOBJ)/vbe32.html \
$(DOCOBJ)/vga.html \
$(DOCOBJ)/video.html \
$(DOCOBJ)/off.html \
$(DOCOBJ)/portio.html \
$(DOCOBJ)/carddos.html
endif
ifeq ($(CONF_SYSTEM),windows)
CAB_DOC_BIN += \
$(DOCOBJ)/videow.txt \
$(DOCOBJ)/svgawin.txt \
$(DOCOBJ)/cardwin.txt \
$(DOCOBJ)/videow.html \
$(DOCOBJ)/svgawin.html \
$(DOCOBJ)/cardwin.html
endif
CAB_SUPPORT_SRC = \
$(RCSRC) \
$(srcdir)/support/video.pcx \
$(srcdir)/support/videobis.pcx \
$(srcdir)/support/vbev.bat \
$(srcdir)/support/vgav.bat \
$(srcdir)/support/videowv.bat
CAB_CONTRIB_SRC = \
$(wildcard contrib/cab/*)
CAB_ROOT_BIN += \
$(RCSRC)
ifeq ($(CONF_SYSTEM),dos)
CAB_ROOT_BIN += \
$(srcdir)/advance/vbe/vbe.com \
$(srcdir)/advance/vbe32/vbe32.exe \
$(srcdir)/advance/vga/vga.exe \
$(srcdir)/advance/video/video.exe \
$(srcdir)/advance/off/off.com \
$(srcdir)/advance/portio/portio.exe \
$(srcdir)/support/vbev.bat \
$(srcdir)/support/vgav.bat \
$(srcdir)/support/cwsdpmi.exe \
$(VOBJ)/advv$(EXE) \
$(srcdir)/support/video.pcx \
$(srcdir)/support/videobis.pcx
endif
ifeq ($(CONF_SYSTEM),windows)
CAB_ROOT_BIN += \
$(srcdir)/support/sdl.dll \
$(srcdir)/support/videowv.bat \
$(VOBJ)/advv$(EXE) \
$(srcdir)/advance/videow/videow.exe \
$(srcdir)/advance/svgalib/svgawin/driver/svgawin.sys \
$(srcdir)/advance/svgalib/svgawin/install/svgawin.exe
endif
CAB_DIST_FILE_SRC = advancecab-$(CABVERSION)
CAB_DIST_FILE_BIN = advancecab-$(CABVERSION)-$(BINARYTAG)
CAB_DIST_DIR_SRC = $(CAB_DIST_FILE_SRC)
CAB_DIST_DIR_BIN = $(CAB_DIST_FILE_BIN)
distcab: $(RCSRC)
mkdir $(CAB_DIST_DIR_SRC)
cp $(CAB_ROOT_SRC) $(CAB_DIST_DIR_SRC)
mkdir $(CAB_DIST_DIR_SRC)/doc
cp $(CAB_DOC_SRC) $(CAB_DIST_DIR_SRC)/doc
mkdir $(CAB_DIST_DIR_SRC)/support
cp $(CAB_SUPPORT_SRC) $(CAB_DIST_DIR_SRC)/support
mkdir $(CAB_DIST_DIR_SRC)/advance
cp $(CAB_ADVANCE_SRC) $(CAB_DIST_DIR_SRC)/advance
mkdir $(CAB_DIST_DIR_SRC)/advance/card
cp $(CARD_SRC) $(CAB_DIST_DIR_SRC)/advance/card
mkdir $(CAB_DIST_DIR_SRC)/advance/tsr
cp $(TSR_SRC) $(CAB_DIST_DIR_SRC)/advance/tsr
mkdir $(CAB_DIST_DIR_SRC)/advance/vbe
cp $(VBE_SRC) $(CAB_DIST_DIR_SRC)/advance/vbe
mkdir $(CAB_DIST_DIR_SRC)/advance/vbe32
cp $(VBE32_SRC) $(CAB_DIST_DIR_SRC)/advance/vbe32
mkdir $(CAB_DIST_DIR_SRC)/advance/vbew
cp $(VBEW_SRC) $(CAB_DIST_DIR_SRC)/advance/vbew
mkdir $(CAB_DIST_DIR_SRC)/advance/vga
cp $(VGA_SRC) $(CAB_DIST_DIR_SRC)/advance/vga
mkdir $(CAB_DIST_DIR_SRC)/advance/video
cp $(VIDEO_SRC) $(CAB_DIST_DIR_SRC)/advance/video
mkdir $(CAB_DIST_DIR_SRC)/advance/off
cp $(OFF_SRC) $(CAB_DIST_DIR_SRC)/advance/off
mkdir $(CAB_DIST_DIR_SRC)/advance/portio
cp $(PORTIO_SRC) $(CAB_DIST_DIR_SRC)/advance/portio
mkdir $(CAB_DIST_DIR_SRC)/advance/videow
cp $(VIDEOWIN_SRC) $(CAB_DIST_DIR_SRC)/advance/videow
mkdir $(CAB_DIST_DIR_SRC)/advance/d2
cp $(D2_SRC) $(CAB_DIST_DIR_SRC)/advance/d2
mkdir $(CAB_DIST_DIR_SRC)/advance/dos
cp $(DOS16_SRC) $(CAB_DIST_DIR_SRC)/advance/dos
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib
cp $(SVGALIB_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/clockchi
cp $(SVGALIBCLOCKCHI_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/clockchi
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/ramdac
cp $(SVGALIBRAMDAC_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/ramdac
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/drivers
cp $(SVGALIBDRIVERS_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/drivers
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgados
cp $(SVGALIBSVGADOS_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgados
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin
cp $(SVGALIBSVGAWIN_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/sys
cp $(SVGALIBSVGAWINSYS_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/sys
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/install
cp $(SVGALIBSVGAWININSTALL_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/install
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/driver
cp $(SVGALIBSVGAWINDRIVER_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgawin/driver
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgavdd
cp $(SVGALIBSVGAVDD_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgavdd
mkdir $(CAB_DIST_DIR_SRC)/advance/svgalib/svgavdd/vdd
cp $(SVGALIBSVGAVDDVDD_SRC) $(CAB_DIST_DIR_SRC)/advance/svgalib/svgavdd/vdd
mkdir $(CAB_DIST_DIR_SRC)/contrib
mkdir $(CAB_DIST_DIR_SRC)/contrib/cab
cp -R $(CAB_CONTRIB_SRC) $(CAB_DIST_DIR_SRC)/contrib/cab
rm -f $(CAB_DIST_FILE_SRC).tar.gz
tar cfzo $(CAB_DIST_FILE_SRC).tar.gz $(CAB_DIST_DIR_SRC)
rm -r $(CAB_DIST_DIR_SRC)
distcabbin: $(CAB_ROOT_BIN) $(CAB_DOC_BIN)
mkdir $(CAB_DIST_DIR_BIN)
cp $(DOCOBJ)/readcab.txt $(CAB_DIST_DIR_BIN)/readme.txt
cp $(DOCOBJ)/relecab.txt $(CAB_DIST_DIR_BIN)/release.txt
cp $(DOCOBJ)/histcab.txt $(CAB_DIST_DIR_BIN)/history.txt
cp $(srcdir)/COPYING $(CAB_DIST_DIR_BIN)/copying.txt
cp $(CAB_ROOT_BIN) $(CAB_DIST_DIR_BIN)
mkdir $(CAB_DIST_DIR_BIN)/doc
cp $(CAB_DOC_BIN) $(CAB_DIST_DIR_BIN)/doc
ifeq ($(CONF_SYSTEM),dos)
mkdir $(CAB_DIST_DIR_BIN)/contrib
cp -r $(CAB_CONTRIB_SRC) $(CAB_DIST_DIR_BIN)/contrib
endif
rm -f $(CAB_DIST_FILE_BIN).zip
find $(CAB_DIST_DIR_BIN) \( -name "*.txt" \) -type f -exec utod {} \;
cd $(CAB_DIST_DIR_BIN) && zip -r ../$(CAB_DIST_FILE_BIN).zip *
rm -r $(CAB_DIST_DIR_BIN)