forked from fenugrec/tekfwtool
/
mkf_dos
64 lines (46 loc) · 1.07 KB
/
mkf_dos
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
# Modified version to compile a DOS binary with native MS C6 compiler.
#
# v0 : uses dummy target-procs.h
# To use : "nmake /f tfdos"
#
# Notes:
# DOS sucks. 8.3 sucks.
#
# CL flags:
# /Fc .COD source+asm listing
# /Fs .LST source listing (prints compiler warnings inline)
#
# LINK flag:
# /nod : don't link against default, for some reason it wants SLIBCE (emulated fpu)
#
cc=cl
link=link
cflags=/c /Idoslib /D__MSDOS__ /Fc
all: getcal.exe tfdos.exe
tfdos.exe: tfdos.obj getopt.obj
$(link) /nod \
tfdos.obj getopt.obj doslib\MCIB.LIB,\
tfdos.exe,tfdos.map,slibc7;
tfdos.c: tekfwt~1.h tekfwt~2.c
copy tekfwt~1.h tfdos.h
copy tekfwt~2.c tfdos.c
.c.obj:
$(cc) $(cdebug) $(cflags) $(cvars) $*.c
tfdos.obj: tfdos.c
getopt.obj: doslib\getopt.c
#change last line to
### getcal.exe,getcal.map,slibc7;
# to produce a mapfile
getcal.exe: getcal.obj
$(link) /nod \
getcal.obj doslib\MCIB.LIB,\
getcal.exe,,slibc7;
getcal.c: getcal~1.c
copy getcal~1.c getcal.c
.c.obj:
$(cc) $(cdebug) $(cflags) $(cvars) $*.c
getcal.obj: getcal.c
#can't do this
#clean:
# del *.obj
# del tfdos.exe