|
|
1.1 root 1: #
2: DESTDIR=
3: CFLAGS= -O
4:
5: # Programs that live in subdirectories, and have makefiles of their own.
6: #
7: SUBDIR=
8:
9: # C programs that live in the current directory and do not need
10: # explicit make lines.
11: #
12: STD=
13:
14: # C programs that live in the current directory and need explicit make lines.
15: #
16: NSTD=
17:
18: # Shell scripts
19: #
20: SHELL=
21:
22: all: ${SUBDIR} ${STD} ${NSTD}
23:
24: #${SUBDIR}: /tmp
25: # cd $@; make ${MFLAGS}
26: #
27: #${STD}:
28: # cc ${CFLAGS} -o $@ [email protected]
29: #
30: # Files listed in ${NSTD} have explicit make lines given below.
31:
32: install:
33: -for i in ${SUBDIR}; do \
34: (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
35: -for i in ${STD} ${NSTD}; do \
36: (install $$i ${DESTDIR}/usr/local/$$i); done
37: -for i in ${SHELL}; do \
38: (install -c -m 755 $$i.sh ${DESTDIR}/usr/local/$$i); done
39:
40: clean:
41: rm -f a.out core *.s *.o
42: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
43: rm -f ${STD} ${NSTD}
44:
45: depend:
46: cat </dev/null >x.c
47: for i in ${STD} ${NSTD}; do \
48: (echo $$i: $$i.c >>makedep; \
49: /bin/grep '^#[ ]*include' x.c $$i.c | sed \
50: -e 's,<\(.*\)>,"/usr/include/\1",' \
51: -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
52: -e 's/\.c//' >>makedep); done
53: echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
54: echo '$$r makedep' >>eddep
55: echo 'w' >>eddep
56: cp Makefile Makefile.bak
57: ed - Makefile < eddep
58: rm eddep makedep x.c
59: echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
60: echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
61: echo '# see make depend above' >> Makefile
62:
63: # DO NOT DELETE THIS LINE -- make depend uses it
64:
65: # DEPENDENCIES MUST END AT END OF FILE
66: # IF YOU PUT STUFF HERE IT WILL GO AWAY
67: # see make depend above
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.