Commit | Line | Data |
---|---|---|
6468808a | 1 | # |
35378dd8 | 2 | # Copyright (c) 1987 Regents of the University of California. |
6468808a DF |
3 | # All rights reserved. The Berkeley software License Agreement |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
1db24759 | 6 | # @(#)Makefile 5.3 (Berkeley) %G% |
0b095c72 SL |
7 | # |
8 | CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D | |
35378dd8 | 9 | LIBC= /lib/libc.a |
87e481ed SL |
10 | SRCS= termcap.c tgoto.c tputs.c |
11 | OBJS= termcap.o tgoto.o tputs.o | |
0b095c72 SL |
12 | |
13 | .c.o: | |
35378dd8 KB |
14 | ${CC} ${CFLAGS} -c -p $*.c |
15 | ld -x -r -o profiled/$*.o $*.o | |
16 | ${CC} ${CFLAGS} -c $*.c | |
17 | ld -X -r $*.o | |
0b095c72 SL |
18 | mv a.out $*.o |
19 | ||
35378dd8 KB |
20 | all: termcap.a termcap_p.a |
21 | ||
87e481ed SL |
22 | termcap.a termcap_p.a: ${OBJS} |
23 | ar cr termcap.a ${OBJS} | |
24 | cd profiled; ar cr ../termcap_p.a ${OBJS} | |
0b095c72 | 25 | |
1db24759 JK |
26 | test: |
27 | ranlib termcap.a | |
28 | ${CC} ${CFLAGS} -o tc1 tc1.c termcap.a | |
29 | ${CC} ${CFLAGS} -o tc2 tc2.c termcap.a | |
30 | ${CC} ${CFLAGS} -o tc3 tc3.c termcap.a | |
31 | ||
35378dd8 KB |
32 | clean: FRC |
33 | rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a | |
34 | ||
35 | depend: FRC | |
36 | mkdep ${CFLAGS} ${SRCS} | |
37 | ||
38 | install: FRC | |
39 | install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a | |
40 | rm -f ${DESTDIR}/usr/lib/libtermlib.a | |
0b095c72 SL |
41 | ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a |
42 | ranlib ${DESTDIR}/usr/lib/libtermcap.a | |
35378dd8 KB |
43 | install -o bin -g bin -m 644 termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a |
44 | rm -f ${DESTDIR}/usr/lib/libtermlib_p.a | |
0b095c72 SL |
45 | ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a |
46 | ranlib ${DESTDIR}/usr/lib/libtermcap_p.a | |
47 | ||
35378dd8 KB |
48 | lint: FRC |
49 | lint ${CFLAGS} ${SRCS} | |
50 | ||
51 | tags: FRC | |
52 | ctags ${SRCS} | |
53 | ||
54 | FRC: | |
55 | ||
56 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
57 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
58 | ||
59 | termcap.o: termcap.c /usr/include/ctype.h | |
60 | tgoto.o: tgoto.c | |
61 | tputs.o: tputs.c /usr/include/sgtty.h /usr/include/sys/ioctl.h | |
62 | tputs.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
63 | tputs.o: /usr/include/ctype.h | |
64 | ||
65 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |