BSD 4_3_Tahoe release
[unix-history] / usr / src / ucb / dbx / Makefile
index 149d08a..e07f85a 100644 (file)
@@ -3,7 +3,7 @@
 # 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) 10/9/85
+#      @(#)Makefile    5.12 (Berkeley) 6/10/88
 #
 # make file for debugger "dbx"
 #
 #
 # make file for debugger "dbx"
 #
@@ -17,19 +17,17 @@ AOUT        = tdbx
 DESTDIR        =
 DEST   = /usr/ucb/dbx
 
 DESTDIR        =
 DEST   = /usr/ucb/dbx
 
-# Install the mail address of the person maintaining dbx below
-# as -DMAINTAINER.  A null string disables gripes.
-
 CC     = cc
 CC     = cc
-CFLAGS = '-DMAINTAINER=""' -O
+AS     = as
+#
+# if you want gripes
+# CFLAGS = -g '-DMAINTAINER="linton@shasta.stanford.edu"'
+#
+CFLAGS = -O # -g
 
 LD = cc
 
 LD = cc
-LDFLAGS        = 
-LIBRARIES =
-
-# LD   = /bin/oldld
-# LDFLAGS      = -X /lib/crt0.o
-# LIBRARIES = -lg -lc
+LDFLAGS        = # -g
+LIBRARIES = # -lPW for IRIS (System V)
 
 OBJ = \
     y.tab.o \
 
 OBJ = \
     y.tab.o \
@@ -100,7 +98,7 @@ SRC = \
     asm.c \
     events.c \
     c.c \
     asm.c \
     events.c \
     c.c \
-    cerror.s \
+    cerror.${MACHINE}.s \
     check.c \
     coredump.c \
     debug.c \
     check.c \
     coredump.c \
     debug.c \
@@ -110,7 +108,6 @@ SRC = \
     languages.c \
     library.c \
     lists.c \
     languages.c \
     library.c \
     lists.c \
-    machine.c \
     main.c \
     mappings.c \
     modula-2.c \
     main.c \
     mappings.c \
     modula-2.c \
@@ -120,13 +117,14 @@ SRC = \
     pascal.c \
     printsym.c \
     process.c \
     pascal.c \
     printsym.c \
     process.c \
-    runtime.c \
     scanner.c \
     source.c \
     stabstring.c \
     symbols.c \
     tree.c \
     scanner.c \
     source.c \
     stabstring.c \
     symbols.c \
     tree.c \
-    ops.c
+    ${MACHINE}.c \
+    runtime.${MACHINE}.c \
+    ops.${MACHINE}.c
 
 .c.o:
        @echo "compiling $*.c"
 
 .c.o:
        @echo "compiling $*.c"
@@ -134,7 +132,10 @@ SRC = \
 
 .s.o:
        @echo "assembling $*.s"
 
 .s.o:
        @echo "assembling $*.s"
-       @${CC}  -c $*.s
+       @rm -f tmp
+       @/lib/cpp $*.s | grep -v "^#" > tmp
+       @${AS} -o $*.o tmp
+       @rm -f tmp
 
 .c.h:
        ./makedefs -f $*.c $*.h
 
 .c.h:
        ./makedefs -f $*.c $*.h
@@ -156,15 +157,33 @@ y.tab.c: commands.y
        @echo "expect 2 shift/reduce conflicts"
        yacc -d commands.y
 
        @echo "expect 2 shift/reduce conflicts"
        yacc -d commands.y
 
+cerror.s: cerror.${MACHINE}.s
+       @rm -f cerror.s
+       @ln -s cerror.${MACHINE}.s cerror.s
+
+machine.c: ${MACHINE}.c
+       @rm -f machine.c
+       @ln -s ${MACHINE}.c machine.c
+
+ops.c: ops.${MACHINE}.c
+       @rm -f ops.c
+       @ln -s ops.${MACHINE}.c ops.c
+
+runtime.c: runtime.${MACHINE}.c
+       @rm -f runtime.c
+       @ln -s runtime.${MACHINE}.c runtime.c
+
 makedefs: makedefs.c library.o cerror.o
 makedefs: makedefs.c library.o cerror.o
-       ${CC} -O makedefs.c library.o cerror.o -o makedefs
+       ${CC} -g makedefs.c library.o cerror.o -o makedefs
 
 mkdate: mkdate.c
 
 mkdate: mkdate.c
-       ${CC} -O mkdate.c -o mkdate
+       ${CC} -g ${CFLAGS} mkdate.c -o mkdate
 
 print:
        @echo "don't print it, it's too long"
 
 
 print:
        @echo "don't print it, it's too long"
 
+depend:
+
 #
 # Don't worry about the removal of header files, they're created from
 # the source files.
 #
 # Don't worry about the removal of header files, they're created from
 # the source files.
@@ -172,7 +191,9 @@ print:
 
 clean:
        rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \
 
 clean:
        rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \
-           makedefs makedefs.o date.c core mon.out prof.out make.out
+           makedefs makedefs.o date.c core mon.out prof.out make.out \
+           cerror.s ops.c machine.c runtime.c date.o
+       @chdir tests; make clean
 
 cleandefs:
        rm -f ${HDR} y.tab.h
 
 cleandefs:
        rm -f ${HDR} y.tab.h
@@ -180,21 +201,27 @@ cleandefs:
 testinstall: ${AOUT} test install
 
 test:
 testinstall: ${AOUT} test install
 
 test:
-       @chdir tests; make
+       @cd tests; make
 
 install: ${AOUT}
 
 install: ${AOUT}
-       install -s ${AOUT} ${DESTDIR}/${DEST}
+       install -s -o bin -g bin -m 755 ${AOUT} ${DESTDIR}${DEST}
 
 #
 # Create a tar file called "tape" containing relevant files.
 #
 
 
 #
 # Create a tar file called "tape" containing relevant files.
 #
 
-TAPE = tape
+TAPE = tape
 
 tape:
 
 tape:
-       @tar cf ${TAPE} \
-           Makefile History version READ_ME ${SRC} \
-           makedefs.c mkdate.c tests pchanges ptests
+       @tar c${TAPE} Makefile History READ_ME ${SRC} \
+           makedefs.c mkdate.c tests pc0mods dbx.1 newdbx.1 dbxstab.5
+
+#
+# without tests subdirectory
+#
+srconlytape:
+       @tar c${TAPE} Makefile History READ_ME ${SRC} \
+           makedefs.c mkdate.c dbx.1 newdbx.1 dbxstab.5
 
 #
 # Header dependencies are purposely incomplete since header files
 
 #
 # Header dependencies are purposely incomplete since header files