Commit | Line | Data |
---|---|---|
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 | # |
7ea8e154 | 17 | # @(#)Makefile 5.6 (Berkeley) %G% |
0b095c72 SL |
18 | # |
19 | CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D | |
35378dd8 | 20 | LIBC= /lib/libc.a |
87e481ed SL |
21 | SRCS= termcap.c tgoto.c tputs.c |
22 | OBJS= termcap.o tgoto.o tputs.o | |
f3c2752f | 23 | MAN= termcap.0 |
7ea8e154 | 24 | MDIR= ${DESTDIR}/usr/man/cat3 |
0b095c72 SL |
25 | |
26 | .c.o: | |
35378dd8 KB |
27 | ${CC} ${CFLAGS} -c -p $*.c |
28 | ld -x -r -o profiled/$*.o $*.o | |
29 | ${CC} ${CFLAGS} -c $*.c | |
30 | ld -X -r $*.o | |
0b095c72 SL |
31 | mv a.out $*.o |
32 | ||
35378dd8 KB |
33 | all: termcap.a termcap_p.a |
34 | ||
87e481ed SL |
35 | termcap.a termcap_p.a: ${OBJS} |
36 | ar cr termcap.a ${OBJS} | |
37 | cd profiled; ar cr ../termcap_p.a ${OBJS} | |
0b095c72 | 38 | |
1db24759 JK |
39 | test: |
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 | ||
31a14b65 | 45 | clean: |
35378dd8 KB |
46 | rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a |
47 | ||
31a14b65 KB |
48 | cleandir: clean |
49 | rm -f ${MAN} tags .depend | |
50 | ||
51 | depend: | |
35378dd8 KB |
52 | mkdep ${CFLAGS} ${SRCS} |
53 | ||
f3c2752f | 54 | install: ${MAN} |
35378dd8 KB |
55 | install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a |
56 | rm -f ${DESTDIR}/usr/lib/libtermlib.a | |
0b095c72 SL |
57 | ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a |
58 | ranlib ${DESTDIR}/usr/lib/libtermcap.a | |
35378dd8 KB |
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 | |
0b095c72 SL |
61 | ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a |
62 | ranlib ${DESTDIR}/usr/lib/libtermcap_p.a | |
f3c2752f | 63 | install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3 |
7ea8e154 KB |
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 | |
0b095c72 | 70 | |
31a14b65 | 71 | lint: |
35378dd8 KB |
72 | lint ${CFLAGS} ${SRCS} |
73 | ||
31a14b65 | 74 | tags: |
35378dd8 | 75 | ctags ${SRCS} |