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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 5.6 (Berkeley) 04/10/89 18# 19CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D 20LIBC= /lib/libc.a 21SRCS= termcap.c tgoto.c tputs.c 22OBJS= termcap.o tgoto.o tputs.o 23MAN= termcap.0 24MDIR= ${DESTDIR}/usr/man/cat3 25 26.c.o: 27 ${CC} ${CFLAGS} -c -p $*.c 28 ld -x -r -o profiled/$*.o $*.o 29 ${CC} ${CFLAGS} -c $*.c 30 ld -X -r $*.o 31 mv a.out $*.o 32 33all: termcap.a termcap_p.a 34 35termcap.a termcap_p.a: ${OBJS} 36 ar cr termcap.a ${OBJS} 37 cd profiled; ar cr ../termcap_p.a ${OBJS} 38 39test: 40 ranlib termcap.a 41 ${CC} ${CFLAGS} -o tc1 tc1.c termcap.a 42 ${CC} ${CFLAGS} -o tc2 tc2.c termcap.a 43 ${CC} ${CFLAGS} -o tc3 tc3.c termcap.a 44 45clean: 46 rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a 47 48cleandir: clean 49 rm -f ${MAN} tags .depend 50 51depend: 52 mkdep ${CFLAGS} ${SRCS} 53 54install: ${MAN} 55 install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a 56 rm -f ${DESTDIR}/usr/lib/libtermlib.a 57 ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a 58 ranlib ${DESTDIR}/usr/lib/libtermcap.a 59 install -o bin -g bin -m 644 termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a 60 rm -f ${DESTDIR}/usr/lib/libtermlib_p.a 61 ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a 62 ranlib ${DESTDIR}/usr/lib/libtermcap_p.a 63 install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3 64 rm -f ${MDIR}/tgetent.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetent.0 65 rm -f ${MDIR}/tgetflag.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetflag.0 66 rm -f ${MDIR}/tgetnum.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetnum.0 67 rm -f ${MDIR}/tgetstr.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetstr.0 68 rm -f ${MDIR}/tgoto.0; ln ${MDIR}/termcap.0 ${MDIR}/tgoto.0 69 rm -f ${MDIR}/tputs.0; ln ${MDIR}/termcap.0 ${MDIR}/tputs.0 70 71lint: 72 lint ${CFLAGS} ${SRCS} 73 74tags: 75 ctags ${SRCS} 76