date and time created 87/07/11 18:43:03 by zliu
[unix-history] / usr / src / lib / Makefile
CommitLineData
051b1e55 1#
a096d51a 2# Copyright (c) 1987 Regents of the University of California.
051b1e55
DF
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
a096d51a 6# @(#)Makefile 5.11 (Berkeley) %G%
069fab95
KM
7#
8DESTDIR=
9CFLAGS= -O
74d5a2b2
SL
10TAGSFILE=tags
11
12# Subdirectories whose routines are included in the making of the
13# master tags file (/usr/lib/tags); the Fortran libraries should
14# be on this list, but we don't control them....
15#
16TAGSDIR=libcurses libdbm libln libm libmp libpc libtermlib
069fab95
KM
17
18# Programs that live in subdirectories, and have makefiles of their own.
19#
97f841da 20SUBDIR= learn lib2648 libF77 libI77 libU77 libcurses libdbm libg libln \
1a84272e 21 libom libm libmp libpc libplot libtermlib liby lpr me sendmail
069fab95
KM
22
23# Shell scripts that need only be installed and are never removed.
24#
25SCRIPT= makewhatis
26
a096d51a
KB
27# C source that lives in the current directory
28#
29SRCS= getNAME.c makekey.c
30
069fab95
KM
31# C programs that live in the current directory and do not need
32# explicit make lines.
33#
dcb9aa88 34STD= getNAME makekey
069fab95
KM
35
36# C programs that live in the current directory and need explicit make lines.
37#
a096d51a 38NSTD=
069fab95
KM
39
40all: ${SUBDIR} ${STD} ${NSTD}
41
f0f83cf4 42${SUBDIR}: FRC
069fab95
KM
43 cd $@; make ${MFLAGS}
44
f0f83cf4
KM
45FRC:
46
069fab95 47${STD}:
a096d51a 48 ${CC} ${CFLAGS} -o $@ $@.c
069fab95
KM
49
50install:
3ceb07a7 51 -for i in ${SUBDIR}; do \
a096d51a
KB
52 (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); \
53 done
54 -for i in ${SCRIPT}; do \
55 (install -c -o bin -g bin -m 755 $$i.sh ${DESTDIR}/usr/lib/$$i); \
56 done
57 -for i in ${STD} ${NSTD}; do \
58 (install -s -o bin -g bin -m 755 $$i ${DESTDIR}/usr/lib/$$i); \
59 done
60 install -c -o bin -g bin -m 755 lib.b ${DESTDIR}/usr/lib/lib.b
069fab95 61
74d5a2b2 62tags:
3ceb07a7 63 -for i in ${TAGSDIR}; do \
74d5a2b2
SL
64 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \
65 done
66
069fab95 67clean:
a096d51a 68 rm -f a.out core *.s *.o tags ${STD} ${NSTD}
3ceb07a7 69 -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
069fab95
KM
70
71depend:
a096d51a
KB
72 mkdep -p ${CFLAGS} ${SRCS}
73 -for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done
069fab95
KM
74
75# Files listed in ${NSTD} have explicit make lines given below.
76
a096d51a
KB
77# DO NOT DELETE THIS LINE -- mkdep uses it.
78# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
069fab95 79
e34dfa89 80getNAME: getNAME.c /usr/include/strings.h /usr/include/stdio.h
069fab95 81makekey: makekey.c
a096d51a
KB
82
83# IF YOU PUT ANYTHING HERE IT WILL GO AWAY