1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 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) 06/13/88 13# 14CFLAGS= -O 15LIBC= /lib/libc.a 16TAGSFILE=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# 22TAGSDIR=libcurses libdbm libln libm libmp libpc libtermlib 23 24# Programs that live in subdirectories, and have makefiles of their own. 25# 26SUBDIR= learn lib2648 libF77 libI77 libU77 libcurses libdbm libg libln \ 27 libm libmp libpc libplot libtermlib liby lpr me sendmail 28 29# C source that lives in the current directory 30# 31SRCS= getNAME.c makekey.c 32 33# C programs that live in the current directory and do not need 34# explicit make lines. 35# 36STD= getNAME makekey 37 38# C programs that live in the current directory and need explicit make lines. 39# 40NSTD= 41 42all: ${SUBDIR} ${STD} ${NSTD} 43 44${SUBDIR}: FRC 45 cd $@; make ${MFLAGS} 46 47${STD}: ${LIBC} 48 ${CC} ${CFLAGS} -o $@ $@.c 49 50install: FRC 51 -for i in ${SUBDIR}; do \ 52 (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); \ 53 done 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 58 59tags: FRC 60 -for i in ${TAGSDIR}; do \ 61 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ 62 done 63 64clean: FRC 65 rm -f a.out core *.s *.o tags ${STD} ${NSTD} 66 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done 67 68depend: ldepend 69 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done 70 71ldepend: FRC 72 mkdep -p ${CFLAGS} ${SRCS} 73 74FRC: 75 76# Files listed in ${NSTD} have explicit make lines given below. 77 78# DO NOT DELETE THIS LINE -- mkdep uses it. 79# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 80 81getNAME: getNAME.c /usr/include/strings.h /usr/include/stdio.h 82makekey: makekey.c 83 84# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 85