Commit | Line | Data |
---|---|---|
051b1e55 | 1 | # |
a096d51a | 2 | # Copyright (c) 1987 Regents of the University of California. |
32926a82 | 3 | # All rights reserved. |
051b1e55 | 4 | # |
32926a82 KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that this notice is preserved and that due credit is given | |
7 | # to the University of California at Berkeley. The name of the University | |
8 | # may not be used to endorse or promote products derived from this | |
9 | # software without specific prior written permission. This software | |
10 | # is provided ``as is'' without express or implied warranty. | |
11 | # | |
12 | # @(#)Makefile 5.13 (Berkeley) %G% | |
069fab95 | 13 | # |
069fab95 | 14 | CFLAGS= -O |
37b8e2b1 | 15 | LIBC= /lib/libc.a |
74d5a2b2 SL |
16 | TAGSFILE=tags |
17 | ||
18 | # Subdirectories whose routines are included in the making of the | |
19 | # master tags file (/usr/lib/tags); the Fortran libraries should | |
20 | # be on this list, but we don't control them.... | |
21 | # | |
22 | TAGSDIR=libcurses libdbm libln libm libmp libpc libtermlib | |
069fab95 KM |
23 | |
24 | # Programs that live in subdirectories, and have makefiles of their own. | |
25 | # | |
97f841da | 26 | SUBDIR= learn lib2648 libF77 libI77 libU77 libcurses libdbm libg libln \ |
32926a82 | 27 | libm libmp libpc libplot libtermlib liby lpr me sendmail |
069fab95 | 28 | |
a096d51a KB |
29 | # C source that lives in the current directory |
30 | # | |
31 | SRCS= getNAME.c makekey.c | |
32 | ||
069fab95 KM |
33 | # C programs that live in the current directory and do not need |
34 | # explicit make lines. | |
35 | # | |
dcb9aa88 | 36 | STD= getNAME makekey |
069fab95 KM |
37 | |
38 | # C programs that live in the current directory and need explicit make lines. | |
39 | # | |
a096d51a | 40 | NSTD= |
069fab95 | 41 | |
37b8e2b1 | 42 | all: ${SUBDIR} ${STD} ${NSTD} |
069fab95 | 43 | |
f0f83cf4 | 44 | ${SUBDIR}: FRC |
069fab95 KM |
45 | cd $@; make ${MFLAGS} |
46 | ||
37b8e2b1 | 47 | ${STD}: ${LIBC} |
a096d51a | 48 | ${CC} ${CFLAGS} -o $@ $@.c |
069fab95 | 49 | |
37b8e2b1 | 50 | install: FRC |
3ceb07a7 | 51 | -for i in ${SUBDIR}; do \ |
a096d51a KB |
52 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); \ |
53 | done | |
a096d51a KB |
54 | -for i in ${STD} ${NSTD}; do \ |
55 | (install -s -o bin -g bin -m 755 $$i ${DESTDIR}/usr/lib/$$i); \ | |
56 | done | |
57 | install -c -o bin -g bin -m 755 lib.b ${DESTDIR}/usr/lib/lib.b | |
069fab95 | 58 | |
37b8e2b1 | 59 | tags: FRC |
3ceb07a7 | 60 | -for i in ${TAGSDIR}; do \ |
74d5a2b2 SL |
61 | (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ |
62 | done | |
63 | ||
37b8e2b1 | 64 | clean: FRC |
a096d51a | 65 | rm -f a.out core *.s *.o tags ${STD} ${NSTD} |
37b8e2b1 KB |
66 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done |
67 | ||
68 | depend: ldepend | |
69 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done | |
069fab95 | 70 | |
37b8e2b1 | 71 | ldepend: FRC |
a096d51a | 72 | mkdep -p ${CFLAGS} ${SRCS} |
37b8e2b1 KB |
73 | |
74 | FRC: | |
069fab95 KM |
75 | |
76 | # Files listed in ${NSTD} have explicit make lines given below. | |
77 | ||
a096d51a KB |
78 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
79 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
069fab95 | 80 | |
e34dfa89 | 81 | getNAME: getNAME.c /usr/include/strings.h /usr/include/stdio.h |
069fab95 | 82 | makekey: makekey.c |
a096d51a KB |
83 | |
84 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |