Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
PROGS=${TARG:%=$O.%}
2
MANFILES=${TARG:%=%.man}
3
LDFLAGS=
4
YFLAGS=-d
5
 
6
none:VQ:
7
	echo usage: mk all, install, installall, '$O'.cmd, cmd.install, or cmd.installall
8
 
9
all:V:	$PROGS
10
 
11
$O.%:	%.$O $OFILES $LIB
12
	$LD $LDFLAGS -o $target $prereq
13
 
14
%.$O:	$HFILES		# don't combine with following %.$O rules
15
 
16
%.$O:	%.c
17
	$CC $CFLAGS $stem.c
18
 
19
%.$O:	%.s
20
	$AS $AFLAGS $stem.s
21
 
22
y.tab.h y.tab.c:	$YFILES
23
	$YACC $YFLAGS $prereq
24
 
25
lex.yy.c:	$LFILES
26
	$LEX $LFLAGS $prereq
27
 
28
%.install:V:	$BIN/%
29
 
30
$BIN/%:	$O.%
31
	cp $O.$stem $BIN/$stem
32
 
33
%.installall:V:
34
	for (objtype in $CPUS)
35
		mk $stem.install
36
 
37
install:V:
38
	for (i in $TARG)
39
		mk $MKFLAGS $i.install
40
 
41
installall:V:
42
	for(objtype in $CPUS)
43
		mk $MKFLAGS install
44
 
45
%.safeinstall:V:
46
	mk $O.$stem
47
	test -e $BIN/$stem && mv $BIN/$stem $BIN/_$stem
48
	mk $stem.install
49
 
50
%.safeinstallall:V:
51
	for(objtype in $CPUS)
52
		mk $MKFLAGS $stem.safeinstall
53
 
54
safeinstall:V:
55
	for(i in $TARG)
56
		mk $MKFLAGS $i.safeinstall
57
 
58
safeinstallall:V:
59
	for (objtype in $CPUS)
60
		mk safeinstall
61
 
62
update:V:
63
	update $UPDATEFLAGS $UPDATE
64
 
65
# [$OS].??* avoids file names like 9.h
66
nuke:V:
67
	rm -f *.[$OS] y.tab.? lex.yy.c y.debug y.output [$OS].??* *.acid $TARG
68
 
69
clean:V:
70
	rm -f *.[$OS] *.a[$OS] y.tab.? lex.yy.c y.debug y.output [$OS].??* $TARG $CLEANFILES
71
 
72
%.clean:V:
73
	rm -f $stem.[$OS] [$OS].$stem $stem.acid $stem
74
 
75
%.acid: %.$O $HFILES
76
	$CC $CFLAGS -a $stem.c >$target
77
 
78
%.man:	$MAN/$stem
79
	cp $stem.man $MAN/$stem
80
 
81
man:V:	$MANFILES