blob: 294e24505c55e2a19ff4eb73fe12a451d3553f17 (
plain)
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
|
CFLAGS= -O -R
LIBS= ../lib/lib.a
STD= fixfix showfont showtfmwidth checkw
all: ${STD}
${STD}: ${LIBS}
${CC} ${CFLAGS} -o $@ $@.c ${LIBS}
install: all
@echo "these programs don't get installed..."
clean:
rm -f ${STD} *.o a.out core
depend:
for i in ${STD}; do \
${CC} -M ${CFLAGS} $$i.c | sed -e 's/\.o:/:/' -e 's, ./, ,' | \
awk '{ if ($$1 != prev) { if (rec != "") print rec; \
rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec }'; done >makedep
echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ed - Makefile <eddep
rm eddep makedep
echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile
echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >>Makefile
echo '# see make depend above' >>Makefile
# DO NOT DELETE THIS LINE -- make depend uses it
fixfix: fixfix.c /usr/include/stdio.h
showtfmwidth: showtfmwidth.c /usr/include/stdio.h ../h/types.h ../h/fio.h
checkw: checkw.c /usr/include/stdio.h /usr/include/sys/types.h
checkw: /usr/include/sys/stat.h ../h/types.h ../h/fio.h
showfont.o: showfont.c /usr/include/stdio.h ../h/font.h ../h/types.h ../h/conv.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
|