1# 2# Copyright (c) 1987 The 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 the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 4.11 (Berkeley) 05/10/89 18# 19# Flag BSD4_2 means 4.2 or later. 20CFLAGS= -O -DBSD4_2 21LIBC= /lib/libc.a 22LLIB= ${DESTDIR}/usr/libdata/learn/bin 23SRCS= copy.c dounit.c getlesson.c learn.c list.c mem.c makpipe.c maktee.c \ 24 mysys.c selsub.c selunit.c start.c whatnow.c wrapup.c 25OBJS= copy.o dounit.o getlesson.o learn.o list.o mem.o makpipe.o maktee.o \ 26 mysys.o selsub.o selunit.o start.o whatnow.o wrapup.o 27LESSONS=C editor eqn files macros morefiles 28MAN= learn.0 29 30all: learn lrntee lcount getline.o getnum.o 31 32learn: ${OBJS} ${LIBC} 33 ${CC} -o $@ ${CFLAGS} ${OBJS} 34 35lcount lrntee: ${LIBC} 36 ${CC} ${CFLAGS} -o $@ $@.c 37 38clean: 39 rm -f ${OBJS} core learn lrntee lcount getline.o getnum.o 40 41cleandir: clean 42 rm -f ${MAN} tags .depend 43 44depend: ${SRCS} 45 mkdep -p ${CFLAGS} lcount.c lrntee.c 46 mkdep -a ${CFLAGS} ${SRCS} getline.c getnum.c 47 48install: ${MAN} 49 -[ -d ${DESTDIR}/var/log/learn ] || mkdir ${DESTDIR}/var/log/learn 50 -[ -d ${DESTDIR}/usr/libdata/learn ] || mkdir ${DESTDIR}/usr/libdata/learn 51 -[ -d ${DESTDIR}/usr/libdata/learn/bin ] || mkdir ${DESTDIR}/usr/libdata/learn/bin 52 install -c -s -o bin -g bin -m 755 learn ${DESTDIR}/usr/bin/learn 53 install -s -o bin -g bin -m 755 learn ${LLIB}/learn 54 install -s -o bin -g bin -m 755 lrntee ${LLIB}/lrntee 55 install -s -o bin -g bin -m 755 lcount ${LLIB}/lcount 56 install -o bin -g bin -m 644 getline.o ${LLIB}/getline.o 57 install -o bin -g bin -m 644 getnum.o ${LLIB}/getnum.o 58 install -c -o bin -g bin -m 644 learnlib/Linfo ${DESTDIR}/usr/libdata/learn/Linfo 59 install -c -o bin -g bin -m 644 learnlib/Xinfo ${DESTDIR}/usr/libdata/learn/Xinfo 60 cd learnlib; tar cf - ${LESSONS} | (cd ${DESTDIR}/usr/libdata/learn; tar xpf -); 61 chmod 755 ${LLIB}/../*/Init 62 chmod 755 ${DESTDIR}/usr/libdata/learn ${DESTDIR}/var/log/learn \ 63 ${DESTDIR}/usr/libdata/learn/bin 64 chown root.staff ${DESTDIR}/usr/bin/learn ${DESTDIR}/var/log/learn \ 65 ${DESTDIR}/usr/libdata/learn/bin 66 cd ${LLIB}; rm -f ../C/get*.o; ln getline.o getnum.o ../C 67 install -c -o bin -g bin -m 644 getline.c ${LLIB}/../C/getline.c 68 install -c -o bin -g bin -m 644 getnum.c ${LLIB}/../C/getnum.c 69 install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 70 71lint: ${SRCS} 72 lint ${CFLAGS} ${SRCS} 73 lint ${CFLAGS} lcount.c 74 lint ${CFLAGS} lrntee.c 75 lint ${CFLAGS} getline.c getnum.c 76 77tags: ${SRCS} 78 ctags ${SRCS} 79 ctags -a lcount.c 80 ctags -a lrntee.c 81 ctags -a getline.c getnum.c 82 sort -o tags tags 83