-
Notifications
You must be signed in to change notification settings - Fork 2
/
MAKEFILE
256 lines (217 loc) · 6.97 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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#
# Makefile for diskcopy
#
# Works for borland make.
#
# Works for GNU make only if you don't use the 16 bit dpmi version of the
# borland tools.
#
## change to reflect the real path where you installed tcc.
#includepath = c:\tclite\include -| Only needed if tcc is incorrectly installed
#libdir = c:\tclite\lib _|
# libraries used with diskcopy
catsdir = .\cats
catslib = $(catsdir)\catsdb.lib
includepath = $(includepath);$(catsdir)
io95dir = .\io95
io95lib = $(io95dir)\io95.lib
libs = $(catslib) $(io95lib)
compiler = tcc -c -I$(includepath) -Icats
assembler = nasm #change to nasm16 on 8086/80286
indenter = indenter.bat #indenter.bat
#hlpoptions =
hlpoptions = -DDEF_HELP
recoptions =
#recoptions = -DALL_RECOVERY_MODE
#updateoptions =
updateoptions = -DUPDATE_SERIALNUM
backdrv = d: # just happens to be my ZIP drive
# change to a: for backup to
# floppy disk
options = -w -O -Z $(hlpoptions) $(recoptions) $(updateoptions)
sources = diskcopy.c drive.c ems.asm memtypes.c simplcpy.c xms.asm waitfinp.c tdrvcpy.c \
diskcopy.h drive.h ems.h memtypes.h misc.h xms.h waitfinp.h tdrvcpy.h \
mouse.asm mouse.h switchch.asm scanner.c parser.c scanner.h \
parser.h recovery.c datgen.c fastcopy.h boot.h \
fastcopy.c smdskcpy.c smdskcpy.h critical.asm hicritcl.asm critical.h \
lfnapi.c lfnapi.h lfnchk.asm serialnm.c
objects = diskcopy.obj drive.obj ems.obj memtypes.obj simplcpy.obj xms.obj \
waitfinp.obj tdrvcpy.obj mouse.obj switchch.obj \
scanner.obj parser.obj recovery.obj \
exepath.obj datgen.obj fastcopy.obj smdskcpy.obj critical.obj \
hicritcl.obj lfnapi.obj lfnchk.obj serialnm.obj
diskcopy.exe: $(sources) $(objects)
@cd $(catsdir)
@makecats
@cd ..
@cd $(io95dir)
@makeio95
@cd ..
#@tlib diskcopy + diskcopy.obj
@delete diskcopy.lib
@tlib diskcopy + drive.obj
@tlib diskcopy + ems.obj
@tlib diskcopy + memtypes.obj
@tlib diskcopy + simplcpy.obj
@tlib diskcopy + xms.obj
@tlib diskcopy + waitfinp.obj
@tlib diskcopy + tdrvcpy.obj
@tlib diskcopy + mouse.obj
@tlib diskcopy + switchch.obj
@tlib diskcopy + scanner.obj
@tlib diskcopy + parser.obj
@tlib diskcopy + recovery.obj
@tlib diskcopy + exepath.obj
@tlib diskcopy + datgen.obj
@tlib diskcopy + fastcopy.obj
@tlib diskcopy + smdskcpy.obj
@tlib diskcopy + critical.obj
@tlib diskcopy + hicritcl.obj
@tlib diskcopy + lfnapi.obj
@tlib diskcopy + lfnchk.obj
@tlib diskcopy + serialnm.obj
@tcc -M -ediskcopy.exe diskcopy.lib diskcopy.obj $(libs)
@copy diskcopy.exe ..\..\bin
@del diskcopy.lib
@del diskcopy.bak
diskcopy.obj: diskcopy.c drive.h diskcopy.h memtypes.h misc.h waitfinp.h\
tdrvcpy.h parser.h exepath.h nlsaspct.h simplcpy.h
@$(compiler) $(options) diskcopy.c
drive.obj: drive.c drive.h misc.h
@$(compiler) $(options) drive.c
ems.obj: ems.asm
@$(assembler) ems.asm -f obj -o ems.obj
memtypes.obj: memtypes.c memtypes.h xms.h ems.h diskcopy.h drive.h parser.h
@$(compiler) $(options) memtypes.c
simplcpy.obj: simplcpy.c simplcpy.h
@$(compiler) $(options) simplcpy.c
xms.obj: xms.asm
@$(assembler) xms.asm -f obj -o xms.obj
waitfinp.obj: waitfinp.c waitfinp.h mouse.h
@$(compiler) $(options) waitfinp.c
tdrvcpy.obj: tdrvcpy.c diskcopy.h tdrvcpy.h memtypes.h waitfinp.h drive.h \
nlsaspct.h
@$(compiler) $(options) tdrvcpy.c
scanner.obj: scanner.c diskcopy.h drive.h scanner.h parser.h datgen.h
@$(compiler) $(options) scanner.c
parser.obj: parser.c diskcopy.h drive.h scanner.h parser.h datgen.h \
nlsaspct.h
@$(compiler) $(options) parser.c
recovery.obj: recovery.c diskcopy.h drive.h nlsaspct.h
@$(compiler) $(options) recovery.c
exepath.obj: exepath.c exepath.h
@$(compiler) $(options) exepath.c
mouse.obj: mouse.asm
@$(assembler) mouse.asm -f obj -o mouse.obj
switchch.obj: switchch.asm
@$(assembler) switchch.asm -f obj -o switchch.obj
critical.obj: critical.asm
@$(assembler) critical.asm -f obj -o critical.obj
hicritcl.obj: critical.asm
@$(assembler) hicritcl.asm -f obj -o hicritcl.obj
datgen.obj: datgen.c datgen.h scanner.h parser.h drive.h fastcopy.h
@$(compiler) $(options) datgen.c
fastcopy.obj: fastcopy.c fastcopy.h drive.h diskcopy.h
@$(compiler) $(options) fastcopy.c
smdskcpy.obj: smdskcpy.c drive.h memtypes.h smdskcpy.h
@$(compiler) $(options) smdskcpy.c
lfnapi.obj: lfnapi.c drive.h lfnapi.h
@$(compiler) $(options) lfnapi.c
lfnchk.obj: lfnchk.asm
@$(assembler) lfnchk.asm -f obj -o lfnchk.obj
serialnm.obj: serialnm.c boot.h nlsaspct.h
@$(compiler) $(options) serialnm.c
clean:
@cd $(catsdir)
@make clean
@cd ..
@cd $(io95dir)
@make clean
@cd ..
@delete diskcopy.exe
@delete diskcopy.obj
@delete drive.obj
@delete ems.obj
@delete memtypes.obj
@delete simplcpy.obj
@delete xms.obj
@delete *.bak
@delete waitfinp.obj
@delete tdrvcpy.obj
@delete mouse.obj
@delete switchch.obj
@delete drvtypes.obj
@delete scanner.obj
@delete parser.obj
@delete exepath.obj
@delete recovery.obj
@delete fastcopy.obj
@delete datgen.obj
@delete smdskcpy.obj
@delete lfnapi.obj
@delete lfnchk.obj
@delete serialnm.obj
@delete critical.obj
@delete hicritcl.obj
backup: $(sources) #diskcopy.exe -- We assume that you know what need backing up
@make clean
@cls
@echo Put your backup diskette in drive $(backdrv), and
@pause
@md $(backdrv)\diskcopy
@xcopy \diskcopy $(backdrv)\diskcopy /s
@echo Done.
debugger: diskcopy.exe
@delete diskcopy.exe
@delete diskcopy.obj
@delete drive.obj
@delete memtypes.obj
@delete simplcpy.obj
@delete waitfinp.obj
@delete tdrvcpy.obj
@delete scanner.obj
@delete parser.obj
@delete exepath.obj
@delete recovery.obj
@delete datgen.obj
@delete fastcopy.obj
@delete smdskcpy.obj
@delete lfnapi.obj
@delete serialnm.obj
indentation: $(sources) # requires GNU indent (DOS version)
#all C files
@$(indenter) diskcopy.c
@$(indenter) drive.c
@$(indenter) memtypes.c
@$(indenter) simplcpy.c
@$(indenter) waitfinp.c
@$(indenter) tdrvcpy.c
@$(indenter) parser.c
@$(indenter) scanner.c
@$(indenter) recovery.c
@$(indenter) datgen.c
@$(indenter) fastcopy.c
@$(indenter) exepath.c
@$(indenter) smdskcpy.c
@$(indenter) lfnapi.c
@$(indenter) serialnm.c
#no asm files (indent doesn't work for assembly)
#all header file
@$(indenter) ems.h
@$(indenter) critical.h
@$(indenter) datgen.h
@$(indenter) diskcopy.h
@$(indenter) drive.h
@$(indenter) exepath.h
@$(indenter) fastcopy.h
@$(indenter) memtypes.h
@$(indenter) simplcpy.h
@$(indenter) mouse.h
@$(indenter) parser.h
@$(indenter) scanner.h
@$(indenter) tdrvcpy.h
@$(indenter) waitfinp.h
@$(indenter) xms.h
@$(indenter) smdskcpy.h
@$(indenter) lfnapi.h
@$(indenter) serialnm.h