date and time created 88/10/19 11:45:49 by bostic
[unix-history] / usr / src / old / pcc / c2.vax / Makefile
index 539196c..ee54c55 100644 (file)
@@ -1,32 +1,49 @@
-#      @(#)Makefile    4.1     (Berkeley)      82/10/27
 #
 #
-CFLAGS=-c -d2 -w -DCOPYCODE -DC2
-LDFLAGS=
-ASDIR = /usr/src/bin/as
+# 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    4.6     (Berkeley)      %G%
+#
+CFLAGS=        -DCOPYCODE -DC2 -O
+ASDIR= ../../../bin/as/as.${MACHINE}
+SRCS=  c20.c c21.c c22.c
+OBJS=  c20.o c21.o c22.o
 
 
-SRCS = makefile c2.h c20.c c21.c c22.c
+all: c2
 
 
-c2:    c20.o c21.o c22.o
-       $(CC) $(LDFLAGS) -z -o c2 c2?.o
+c2: ${OBJS} ${LIBC}
+       ${CC} -o $@ ${OBJS}
 
 
-c20.o: c20.c c2.h
-c21.o: c21.c c2.h
-c22.o:  c22.c c2.h instrs.c2
-       $(CC) $(CFLAGS) -R c22.c
+c22.o: c22.c c2.h instrs.c2
+       ${CC} ${CFLAGS} -R -c c22.c
 
 
-instrs.c2: $(ASDIR)/instrs
-       (echo FLAVOR C2 ; cat $(ASDIR)/instrs) | awk -f /usr/src/bin/as/instrs > instrs.c2
+instrs.c2: ${ASDIR}/instrs
+       (echo FLAVOR C2 ; cat ${ASDIR}/instrs) | awk -f ${ASDIR}/instrs > instrs.c2
 
 clean:
 
 clean:
-       rm -f *.o *.s 
+       rm -f *.o *.s c2
+
+install:
+       install -o bin -g bin -m 755 -s c2 ${DESTDIR}/lib/c2
+
+tags:
+       ctags ${SRCS}
 
 
-install: c2
-       install -s c2 $(DESTDIR)/lib
+depend:
+       mkdep ${CFLAGS} ${SRCS}
 
 
-sources: $(SRCS)
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
 
 
-$(ASDIR)/instrs:
-       (cd $(ASDIR); sccs get instrs)
+c20.o: c20.c
+c20.o:c2.h
+c20.o: /usr/include/stdio.h /usr/include/ctype.h /usr/include/sys/types.h
+c21.o: c21.c
+c21.o:c2.h
+c21.o: /usr/include/stdio.h /usr/include/ctype.h
+c22.o: c22.c
+c22.o:c2.h
+c22.o:./instrs.c2
 
 
-$(SRCS):
-       sccs get $@
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY