-
Notifications
You must be signed in to change notification settings - Fork 11
/
old_tcc.mak
101 lines (75 loc) · 2.22 KB
/
old_tcc.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
# This makefile is for format and Borland Turbo C++ 3.0.
# Changed to use line-initial TAB rather than space: Makes it
# Borland Turbo C 2.01 compatible. Also using no generic rule
# anymore and splitting OBJS into 2 variables, for del command
# line. Plus made command /c explicit for using del!
# Do not forget that all Turbo C must be in PATH and that you
# must have TURBOC.CFG in the current directory.
# Update 2005: link with prf.c light drop-in printf replacement.
#
# Minimum CFLAGS: -mc (can use -ms if not using kitten)
# Smaller for Turbo C: -M -O -N -Z -w -a- -f- -mc
MMODEL=c
CC=tcc
CLINK=tcc
CFLAGS=-M -N -ln -w -a- -f- -f87- -m$(MMODEL) -r- -c
# -M linkmap -O jump optimize -N stack check -f87- no fpu code
# -w warnall -a- no word align -f- no fpu emulator
# -ms small memory model
# -mc compact memory model (should be used with kitten)
# -ln no default libs linked ...
# -r register variables
# -k standard stack frame ...
LDFLAGS=-M -N -ln -w -a- -f- -f87- -m$(MMODEL) -r-
LDLIBS=
RM=command /c del
OBJS1=createfs.obj floppy.obj hdisk.obj main.obj savefs.obj bcread.obj prf.obj
OBJS2=userint.obj driveio.obj getopt.obj init.obj recordbc.obj uformat.obj
OBJS3=msghlpr.obj kitten.obj
# build targets:
all: format.exe
format.exe: $(OBJS1) $(OBJS2) $(OBJS3)
$(CLINK) $(LDFLAGS) -eformat *.obj $(LDLIBS)
# compile targets:
# very convenient but not available in Turbo C 2.01 - generic C/OBJ rule:
# .c.obj:
# $(CC) $(CFLAGS) -c $*.c
createfs.obj: kitten.h
$(CC) $(CFLAGS) createfs.c
floppy.obj: kitten.h
$(CC) $(CFLAGS) floppy.c
hdisk.obj: kitten.h
$(CC) $(CFLAGS) hdisk.c
main.obj: kitten.h
$(CC) $(CFLAGS) main.c
savefs.obj: kitten.h
$(CC) $(CFLAGS) savefs.c
userint.obj: kitten.h
$(CC) $(CFLAGS) userint.c
driveio.obj: kitten.h
$(CC) $(CFLAGS) driveio.c
getopt.obj:
$(CC) $(CFLAGS) getopt.c
init.obj: kitten.h
$(CC) $(CFLAGS) init.c
recordbc.obj: kitten.h
$(CC) $(CFLAGS) recordbc.c
uformat.obj: kitten.h
$(CC) $(CFLAGS) uformat.c
bcread.obj: kitten.h
$(CC) $(CFLAGS) bcread.c
prf.obj:
$(CC) $(CFLAGS) prf.c
kitten.obj: kitten.h
$(CC) $(CFLAGS) kitten.c
msghlpr.obj: kitten.h
$(CC) $(CFLAGS) msghlpr.c
# clean up:
clean:
$(RM) *.obj
clobber:
$(RM) *.bak
$(RM) *.dsk
$(RM) *.exe
$(RM) *.obj
$(RM) *.swp