put in obsoletion notice
[unix-history] / usr / src / lib / libterm / Makefile
CommitLineData
6468808a 1#
31a14b65
KB
2# Copyright (c) 1987 The Regents of the University of California.
3# All rights reserved.
6468808a 4#
31a14b65
KB
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
f3c2752f 15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
31a14b65 16#
f3c2752f 17# @(#)Makefile 5.5 (Berkeley) %G%
0b095c72
SL
18#
19CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D
35378dd8 20LIBC= /lib/libc.a
87e481ed
SL
21SRCS= termcap.c tgoto.c tputs.c
22OBJS= termcap.o tgoto.o tputs.o
f3c2752f 23MAN= termcap.0
0b095c72
SL
24
25.c.o:
35378dd8
KB
26 ${CC} ${CFLAGS} -c -p $*.c
27 ld -x -r -o profiled/$*.o $*.o
28 ${CC} ${CFLAGS} -c $*.c
29 ld -X -r $*.o
0b095c72
SL
30 mv a.out $*.o
31
35378dd8
KB
32all: termcap.a termcap_p.a
33
87e481ed
SL
34termcap.a termcap_p.a: ${OBJS}
35 ar cr termcap.a ${OBJS}
36 cd profiled; ar cr ../termcap_p.a ${OBJS}
0b095c72 37
1db24759
JK
38test:
39 ranlib termcap.a
40 ${CC} ${CFLAGS} -o tc1 tc1.c termcap.a
41 ${CC} ${CFLAGS} -o tc2 tc2.c termcap.a
42 ${CC} ${CFLAGS} -o tc3 tc3.c termcap.a
43
31a14b65 44clean:
35378dd8
KB
45 rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a
46
31a14b65
KB
47cleandir: clean
48 rm -f ${MAN} tags .depend
49
50depend:
35378dd8
KB
51 mkdep ${CFLAGS} ${SRCS}
52
f3c2752f 53install: ${MAN}
35378dd8
KB
54 install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a
55 rm -f ${DESTDIR}/usr/lib/libtermlib.a
0b095c72
SL
56 ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
57 ranlib ${DESTDIR}/usr/lib/libtermcap.a
35378dd8
KB
58 install -o bin -g bin -m 644 termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a
59 rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
0b095c72
SL
60 ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
61 ranlib ${DESTDIR}/usr/lib/libtermcap_p.a
f3c2752f 62 install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3
0b095c72 63
31a14b65 64lint:
35378dd8
KB
65 lint ${CFLAGS} ${SRCS}
66
31a14b65 67tags:
35378dd8 68 ctags ${SRCS}