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 | # |
534a4d54 | 17 | # @(#)Makefile 5.8 (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 | 35 | termcap.a termcap_p.a: ${OBJS} |
e5f47b7a KB |
36 | @echo building normal termcap |
37 | @ar cr termcap.a ${OBJS} | |
38 | ranlib termcap.a | |
39 | @echo building profiled termcap | |
40 | @cd profiled; ar cr ../termcap_p.a ${OBJS} | |
41 | ranlib termcap_p.a | |
0b095c72 | 42 | |
1db24759 | 43 | test: |
1db24759 JK |
44 | ${CC} ${CFLAGS} -o tc1 tc1.c termcap.a |
45 | ${CC} ${CFLAGS} -o tc2 tc2.c termcap.a | |
46 | ${CC} ${CFLAGS} -o tc3 tc3.c termcap.a | |
47 | ||
31a14b65 | 48 | clean: |
35378dd8 KB |
49 | rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a |
50 | ||
31a14b65 KB |
51 | cleandir: clean |
52 | rm -f ${MAN} tags .depend | |
53 | ||
54 | depend: | |
35378dd8 KB |
55 | mkdep ${CFLAGS} ${SRCS} |
56 | ||
f3c2752f | 57 | install: ${MAN} |
35378dd8 | 58 | install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a |
e5f47b7a | 59 | ranlib -t ${DESTDIR}/usr/lib/libtermcap.a |
35378dd8 | 60 | rm -f ${DESTDIR}/usr/lib/libtermlib.a |
0b095c72 | 61 | ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a |
e5f47b7a KB |
62 | install -o bin -g bin -m 644 termcap_p.a \ |
63 | ${DESTDIR}/usr/lib/libtermcap_p.a | |
534a4d54 | 64 | ranlib -t ${DESTDIR}/usr/lib/libtermcap_p.a |
35378dd8 | 65 | rm -f ${DESTDIR}/usr/lib/libtermlib_p.a |
0b095c72 | 66 | ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a |
f3c2752f | 67 | install -c -o bin -g bin -m 444 termcap.0 ${DESTDIR}/usr/man/cat3 |
7ea8e154 KB |
68 | rm -f ${MDIR}/tgetent.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetent.0 |
69 | rm -f ${MDIR}/tgetflag.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetflag.0 | |
70 | rm -f ${MDIR}/tgetnum.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetnum.0 | |
71 | rm -f ${MDIR}/tgetstr.0; ln ${MDIR}/termcap.0 ${MDIR}/tgetstr.0 | |
72 | rm -f ${MDIR}/tgoto.0; ln ${MDIR}/termcap.0 ${MDIR}/tgoto.0 | |
73 | rm -f ${MDIR}/tputs.0; ln ${MDIR}/termcap.0 ${MDIR}/tputs.0 | |
0b095c72 | 74 | |
31a14b65 | 75 | lint: |
35378dd8 KB |
76 | lint ${CFLAGS} ${SRCS} |
77 | ||
31a14b65 | 78 | tags: |
35378dd8 | 79 | ctags ${SRCS} |