File: makefile

package info (click to toggle)
dosemu-freedos 1%3A0.0.b9r5a%2Betch.1-0etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 19,744 kB
  • ctags: 23,279
  • sloc: ansic: 143,864; asm: 20,397; makefile: 3,868; perl: 1,106; yacc: 690; sh: 553; pascal: 297; xml: 150; cpp: 67
file content (90 lines) | stat: -rw-r--r-- 2,040 bytes parent folder | download | duplicates (2)
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
# 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.
#
# Minimum CFLAGS: -ms
# Smaller for Turbo C: -M -O -N -Z -w -a- -f- -ms
# !!! changed from -ms to -mc as it seems that I forgot to make
# !!! some pointers explicitly far...

# macros:

CC=tcc
CFLAGS=-M -N -ln -w -a- -f- -f87- -DDEBUG -ms -r- 
# -M linkmap -O jump optimize -N stack check -Z register optimize
# -w warnall -a- no word align -f- no fpu emulator -f87- no fpu code
# -ms small memory model -ln no default libs linked ...
# -r register variables -k standard stack frame ...
LDFLAGS=
LDLIBS=
RM=command /c del
OBJS1=createfs.obj floppy.obj hdisk.obj main.obj savefs.obj bcread.obj
OBJS2=userint.obj driveio.obj getopt.obj init.obj recordbc.obj uformat.obj

# build targets:

all: format.exe

format.exe: $(OBJS1) $(OBJS2)
	$(CC) $(CFLAGS) $(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:
	$(CC) $(CFLAGS) -c createfs.c

floppy.obj:
	$(CC) $(CFLAGS) -c floppy.c

hdisk.obj:
	$(CC) $(CFLAGS) -c hdisk.c

main.obj:
	$(CC) $(CFLAGS) -c main.c

savefs.obj:
	$(CC) $(CFLAGS) -c savefs.c

userint.obj:
	$(CC) $(CFLAGS) -c userint.c

driveio.obj:
	$(CC) $(CFLAGS) -c driveio.c

getopt.obj:
	$(CC) $(CFLAGS) -c getopt.c

init.obj:
	$(CC) $(CFLAGS) -c init.c

recordbc.obj:
	$(CC) $(CFLAGS) -c recordbc.c

uformat.obj:
	$(CC) $(CFLAGS) -c uformat.c

bcread.obj:
	$(CC) $(CFLAGS) -c bcread.c



# clean up:

clean:
	$(RM) *.obj

clobber: 
	$(RM) *.bak
	$(RM) *.dsk
	$(RM) *.exe
	$(RM) *.obj
	$(RM) *.swp