new template
[unix-history] / usr / src / usr.bin / vgrind / Makefile
index 91f99bb..d71e73f 100644 (file)
@@ -1,33 +1,55 @@
 #
 #
-# Copyright (c) 1980 Regents of the University of California.
+# Copyright (c) 1987 Regents of the University of California.
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    5.3 (Berkeley) %G%
+#      @(#)Makefile    5.3     (Berkeley)      %G%
 #
 #
-DESTDIR=
-CFLAGS=-O 
-SOURCES=vfontedpr.c vgrindefs.c regexp.c retest.c
-CMDS=vfontedpr retest
-OBJS=retest.o regexp.o vfontedpr.o vgrindefs.o
+CFLAGS=        -O
+LIBC=  /lib/libc.a
+RSRCS= retest.c regexp.c
+ROBJS= retest.o regexp.o
+VSRCS= regexp.c vfontedpr.c vgrindefs.c
+VOBJS= regexp.o vfontedpr.o vgrindefs.o
 
 
-all:   $(CMDS) ${OBJS}
+all: retest vfontedpr
 
 
-vfontedpr: vfontedpr.o vgrindefs.o regexp.o
-       cc ${CFLAGS} -o vfontedpr vfontedpr.o vgrindefs.o regexp.o
-retest: retest.o regexp.o
-       cc ${CFLAGS} -o retest retest.c regexp.o
+vfontedpr: ${VOBJS} ${LIBC}
+       ${CC} ${CFLAGS} -o $@ ${VOBJS}
 
 
-install: all
-       install -s vfontedpr ${DESTDIR}/usr/lib/vfontedpr
-       install -c vgrind.sh ${DESTDIR}/usr/ucb/vgrind
-       install -c vgrindefs.src ${DESTDIR}/usr/lib/vgrindefs
-       install -c tmac.vgrind ${DESTDIR}/usr/lib/tmac/tmac.vgrind
+retest: ${ROBJS} ${LIBC}
+       ${CC} ${CFLAGS} -o $@ ${ROBJS}
 
 
-clean:
-       rm -f ${CMDS} ${OBJS}
+clean: FRC
+       rm -f ${OBJS} ${ROBJS} ${VOBJS} core retest vfontedpr
 
 
-depend:
+depend: FRC
+       mkdep ${CFLAGS} ${RSRCS} ${VSRCS}
 
 
-vprintall:
-       csh /usr/ucb/vprint ${SOURCES}
+install: FRC
+       install -s -o bin -g bin -m 755 vfontedpr ${DESTDIR}/usr/lib/vfontedpr
+       install -c -o bin -g bin -m 755 vgrind.sh ${DESTDIR}/usr/ucb/vgrind
+       install -c -o bin -g bin -m 755 vgrindefs.src ${DESTDIR}/usr/lib/vgrindefs
+       install -c -o bin -g bin -m 755 tmac.vgrind ${DESTDIR}/usr/lib/tmac/tmac.vgrind
+
+lint: FRC
+       lint ${CFLAGS} ${RSRCS}
+       lint ${CFLAGS} ${VSRCS}
+
+tags: FRC
+       ctags ${RSRCS}
+       ctags -a ${VSRCS}
+       sort -o tags tags
+
+FRC:
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+retest.o: retest.c /usr/include/ctype.h
+regexp.o: regexp.c /usr/include/ctype.h regexp.c /usr/include/ctype.h
+vfontedpr.o: vfontedpr.c /usr/include/ctype.h /usr/include/stdio.h
+vfontedpr.o: /usr/include/sys/types.h /usr/include/sys/stat.h
+vgrindefs.o: vgrindefs.c /usr/include/ctype.h
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY