BSD 4_3 release
[unix-history] / usr / src / usr.lib / libtermlib / Makefile
CommitLineData
6468808a
DF
1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
95f51977 6# @(#)Makefile 5.1 (Berkeley) 6/5/85
0b095c72
SL
7#
8CFLAGS= -O -DCM_N -DCM_GT -DCM_B -DCM_D
9LD = ld
87e481ed
SL
10SRCS= termcap.c tgoto.c tputs.c
11OBJS= termcap.o tgoto.o tputs.o
12TAGSFILE=tags
0b095c72
SL
13
14.c.o:
15 $(CC) $(CFLAGS) -c -p $*.c
16 $(LD) $(LDFLAGS) -x -r -o profiled/$*.o $*.o
17 $(CC) $(CFLAGS) -c $*.c
18 $(LD) $(LDFLAGS) -X -r $*.o
19 mv a.out $*.o
20
87e481ed
SL
21termcap.a termcap_p.a: ${OBJS}
22 ar cr termcap.a ${OBJS}
23 cd profiled; ar cr ../termcap_p.a ${OBJS}
0b095c72
SL
24
25install: termcap.a termcap_p.a
26 install -c termcap.a ${DESTDIR}/usr/lib/libtermcap.a
27 -rm -f ${DESTDIR}/usr/lib/libtermlib.a
28 ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
29 ranlib ${DESTDIR}/usr/lib/libtermcap.a
30 install -c termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a
31 -rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
32 ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
33 ranlib ${DESTDIR}/usr/lib/libtermcap_p.a
34
87e481ed
SL
35tags:
36 cwd=`pwd`; \
37 for i in ${SRCS}; do \
38 ctags -a -f ${TAGSFILE} $$cwd/$$i; \
39 done
40
41clean:
42 -rm -f *.o profiled/*.o
43 -rm -f termcap.a termcap_p.a
44
0b095c72
SL
45VGRIND= csh /usr/ucb/vgrind
46vgrind:
47 cp /dev/null index
48 ${VGRIND} -h "Termcap library" termcap.c tputs.c tgoto.c
49 ${VGRIND} -h "Termcap library" -x index