BSD 4_3_Tahoe release
[unix-history] / usr / src / usr.lib / libtermlib / Makefile
index cf861eb..09851c5 100644 (file)
@@ -1,35 +1,65 @@
-#      Makefile        4.1     83/06/27
+#
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    5.3     (Berkeley)      9/11/87
 #
 CFLAGS=        -O -DCM_N -DCM_GT -DCM_B -DCM_D
 #
 CFLAGS=        -O -DCM_N -DCM_GT -DCM_B -DCM_D
-LD = ld
+LIBC=  /lib/libc.a
+SRCS=  termcap.c tgoto.c tputs.c
+OBJS=  termcap.o tgoto.o tputs.o
 
 .c.o:
 
 .c.o:
-       $(CC) $(CFLAGS) -c -p $*.c
-       $(LD) $(LDFLAGS) -x -r -o profiled/$*.o $*.o
-       $(CC) $(CFLAGS) -c $*.c
-       $(LD) $(LDFLAGS) -X -r $*.o
+       ${CC} ${CFLAGS} -c -p $*.c
+       ld -x -r -o profiled/$*.o $*.o
+       ${CC} ${CFLAGS} -c $*.c
+       ld -X -r $*.o
        mv a.out $*.o
 
        mv a.out $*.o
 
-termcap.a termcap_p.a: termcap.o tgoto.o tputs.o
-       ar cr termcap.a termcap.o tgoto.o tputs.o
-       cd profiled; ar cr ../termcap_p.a termcap.o tgoto.o tputs.o
+all: termcap.a termcap_p.a
+
+termcap.a termcap_p.a: ${OBJS}
+       ar cr termcap.a ${OBJS}
+       cd profiled; ar cr ../termcap_p.a ${OBJS}
+
+test:
+       ranlib termcap.a
+       ${CC} ${CFLAGS} -o tc1 tc1.c termcap.a
+       ${CC} ${CFLAGS} -o tc2 tc2.c termcap.a
+       ${CC} ${CFLAGS} -o tc3 tc3.c termcap.a
+
+clean: FRC
+       rm -f ${OBJS} core profiled/*.o termcap.a termcap_p.a
 
 
-clean:
-       -rm -f *.o profiled/*.o
-       -rm -f termcap.a termcap_p.a
+depend: FRC
+       mkdep ${CFLAGS} ${SRCS}
 
 
-install: termcap.a termcap_p.a
-       install -c termcap.a ${DESTDIR}/usr/lib/libtermcap.a
-       -rm -f ${DESTDIR}/usr/lib/libtermlib.a
+install: FRC
+       install -o bin -g bin -m 644 termcap.a ${DESTDIR}/usr/lib/libtermcap.a
+       rm -f ${DESTDIR}/usr/lib/libtermlib.a
        ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
        ranlib ${DESTDIR}/usr/lib/libtermcap.a
        ln ${DESTDIR}/usr/lib/libtermcap.a ${DESTDIR}/usr/lib/libtermlib.a
        ranlib ${DESTDIR}/usr/lib/libtermcap.a
-       install -c termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a
-       -rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
+       install -o bin -g bin -m 644 termcap_p.a ${DESTDIR}/usr/lib/libtermcap_p.a
+       rm -f ${DESTDIR}/usr/lib/libtermlib_p.a
        ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
        ranlib ${DESTDIR}/usr/lib/libtermcap_p.a
 
        ln ${DESTDIR}/usr/lib/libtermcap_p.a ${DESTDIR}/usr/lib/libtermlib_p.a
        ranlib ${DESTDIR}/usr/lib/libtermcap_p.a
 
-VGRIND=        csh /usr/ucb/vgrind
-vgrind:
-       cp /dev/null index
-       ${VGRIND} -h "Termcap library" termcap.c tputs.c tgoto.c
-       ${VGRIND} -h "Termcap library" -x index
+lint: FRC
+       lint ${CFLAGS} ${SRCS}
+
+tags: FRC
+       ctags ${SRCS}
+
+FRC:
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+termcap.o: termcap.c /usr/include/ctype.h
+tgoto.o: tgoto.c
+tputs.o: tputs.c /usr/include/sgtty.h /usr/include/sys/ioctl.h
+tputs.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
+tputs.o: /usr/include/ctype.h
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY