convert from asm.sed script to asm program
[unix-history] / usr / src / sys / vax / conf / Makefile.vax
index 989dd44..9685e20 100644 (file)
@@ -1,21 +1,24 @@
-#      Makefile.vax    4.3     %G%
+#      Makefile.vax    6.4     %G%
 #
 #
-# Makefile for 4.1c bsd
+# Makefile for 4.2 BSD
 #
 # This makefile is constructed from a machine description:
 #      config machine
 # Most changes should be made in the machine description
 #
 # This makefile is constructed from a machine description:
 #      config machine
 # Most changes should be made in the machine description
-#      /usr/sys/conf/``machineid''
+#      /sys/conf/``machineid''
 # after which you should do
 #       config machineid
 # Generic makefile changes should be made in
 # after which you should do
 #       config machineid
 # Generic makefile changes should be made in
-#      /usr/sys/conf/makefile
+#      /sys/conf/makefile
 # after which config should be rerun for all machines.
 #
 # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
 #      IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
 #
 # -DTRACE      compile in kernel tracing hooks
 # after which config should be rerun for all machines.
 #
 # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
 #      IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
 #
 # -DTRACE      compile in kernel tracing hooks
+# -DQUOTA      compile in file system quotas
+# -DUUDMA      compile in unibus tu58 pseudo-dma code
+# -DSWABIPS    compile in code to byte swap ip packets on 3Mb/s Ethernet
 #
 C2=    /lib/c2
 LD=    /bin/ld
 #
 C2=    /lib/c2
 LD=    /bin/ld
@@ -33,7 +36,7 @@ AHEADS=       ../vax/pcb.m
 %LOAD
 
 clean:
 %LOAD
 
 clean:
-       rm -f eddep *vmunix* tags *.o locore.i [a-tv-z]*.s \
+       rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \
                errs linterrs makelinks
 
 lint: /tmp
                errs linterrs makelinks
 
 lint: /tmp
@@ -42,13 +45,18 @@ lint: /tmp
            grep -v 'struct/union .* never defined' | \
            grep -v 'possible pointer alignment problem'
 
            grep -v 'struct/union .* never defined' | \
            grep -v 'possible pointer alignment problem'
 
-../conf/symbols.sort: ../conf/symbols.raw
-       grep -v '^#' ../conf/symbols.raw \
-           | sed 's/^  //' | sort -u > ../conf/symbols.sort
+../vax/symbols.sort: ../vax/symbols.raw
+       grep -v '^#' ../vax/symbols.raw \
+           | sed 's/^  //' | sort -u > ../vax/symbols.sort
 
 
-locore.o: assym.s ${AHEADS} ../vax/scb.s ../vax/locore.s ubglue.s \
-    ../vax/mtpr.h ../vax/trap.h ../h/psl.h ../h/pte.h ../vax/cpu.h mba.h
-       cat assym.s ../vax/scb.s ../vax/locore.s ubglue.s > locore.c
+../vax/asm: ../vax/asm.c
+       ${CC} -o ../vax/asm -O ../vax/asm.c
+
+locore.o: assym.s ${AHEADS} ../vax/rpb.s ../vax/scb.s ../vax/locore.s \
+    ubglue.s ../vax/mtpr.h ../vax/trap.h ../machine/psl.h \
+    ../machine/pte.h ../vax/cpu.h mba.h
+       cat assym.s ../vax/rpb.s ../vax/scb.s ../vax/locore.s \
+           ubglue.s > locore.c
        cc -E -I. -DLOCORE ${COPTS} locore.c > locore.i
        @echo 'as -o locore.o $${AHEADS} locore.i'
        @as -o locore.o ${AHEADS} locore.i
        cc -E -I. -DLOCORE ${COPTS} locore.c > locore.i
        @echo 'as -o locore.o $${AHEADS} locore.i'
        @as -o locore.o ${AHEADS} locore.i
@@ -62,11 +70,13 @@ autoconf.o tu.o: makefile
 clock.o machdep.o autoconf.o conf.o cons.o flp.o mba.o uba.o vaxcpu.o : makefile
 # depend on network configuration
 af.o : makefile
 clock.o machdep.o autoconf.o conf.o cons.o flp.o mba.o uba.o vaxcpu.o : makefile
 # depend on network configuration
 af.o : makefile
+# depend on maxusers
+assym.s: makefile
 
 
-assym.s: ../h/param.h ../h/pte.h ../h/buf.h ../h/vmparam.h ../h/vmmeter.h \
-    ../h/dir.h ../h/cmap.h ../h/map.h ../vaxuba/ubavar.h ../h/proc.h \
-    ../h/msgbuf.h
-       cc ${IDENT} ../vax/genassym.c; ./a.out >assym.s; rm -f a.out
+assym.s: ../h/param.h ../machine/pte.h ../h/buf.h ../h/vmparam.h \
+    ../h/vmmeter.h ../h/dir.h ../h/cmap.h ../h/map.h ../vaxuba/ubavar.h \
+    ../h/proc.h ../h/msgbuf.h
+       cc ${IDENT} ${PARAM} ../vax/genassym.c; ./a.out >assym.s; rm -f a.out
 
 ../h/param.h: /usr/include/signal.h
        ${TOUCH} ../h/param.h
 
 ../h/param.h: /usr/include/signal.h
        ${TOUCH} ../h/param.h
@@ -82,8 +92,9 @@ assym.s: ../h/param.h ../h/pte.h ../h/buf.h ../h/vmparam.h ../h/vmmeter.h \
 
 depend:
        grep '^#include' ${CFILES} | grep -v '<' | \
 
 depend:
        grep '^#include' ${CFILES} | grep -v '<' | \
-             sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
-             sed 's/\.c/.o/' | sed 's,../[a-z]*/,,' | \
+       sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
+           -e 's/\.c/.o/' \
+           -e 's,../[a-zA-Z]*/,,' | \
        awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
                else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
                       else rec = rec " " $$2 } } \
        awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
                else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
                       else rec = rec " " $$2 } } \
@@ -117,13 +128,13 @@ print:
        @ls -ls | pr -f
        @cd ../h; ls -ls | pr -f ; pr -f *.m *.h
        @echo 'once upon a time ...'
        @ls -ls | pr -f
        @cd ../h; ls -ls | pr -f ; pr -f *.m *.h
        @echo 'once upon a time ...'
-       @cd ../sys; pr -f asm.sed Locore.c scb.s locore.s
+       @cd ../vax; pr -f asm.c Locore.c scb.s locore.s
        @pr -f ${CFILES}
 
        @pr -f ${CFILES}
 
-ioconf.o: ioconf.c ../h/param.h ../h/pte.h ../h/buf.h ../h/map.h \
+ioconf.o: ioconf.c ../h/param.h ../machine/pte.h ../h/buf.h ../h/map.h \
     ../vaxmba/mbavar.h ../h/vm.h ../vaxuba/ubavar.h
        ${CC} -I. -c -S ${COPTS} ioconf.c
     ../vaxmba/mbavar.h ../h/vm.h ../vaxuba/ubavar.h
        ${CC} -I. -c -S ${COPTS} ioconf.c
-       ${C2} ioconf.s | sed -f ../vax/asm.sed | ${AS} -o ioconf.o
+       ${C2} ioconf.s | ../vax/asm | ${AS} -o ioconf.o
        rm -f ioconf.s
 
 param.c: ../conf/param.c
        rm -f ioconf.s
 
 param.c: ../conf/param.c