file reorg, pathnames.h, paths.h
[unix-history] / usr / src / old / dbx / Makefile
index 7e807d9..151a50c 100644 (file)
@@ -1,27 +1,33 @@
-#      @(#)Makefile    4.1 (Berkeley) %G%
+#
+# Copyright (c) 1983 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    5.15 (Berkeley) %G%
 #
 # make file for debugger "dbx"
 #
 # The file "defs.h" is included by all.
 #
 #
 # make file for debugger "dbx"
 #
 # The file "defs.h" is included by all.
 #
-# N.B.:
-#    My version of cerror automatically catches certain errors
-# such as out of memory, I/O error.  If you re-make this with
-# the standard cerror, the program could fault unexpectedly.
-#
 
 .SUFFIXES:
 
 .SUFFIXES:
-.SUFFIXES: .h .c .s .o
+.SUFFIXES: .h .c .s .o .1 .0
 
 AOUT   = tdbx
 
 AOUT   = tdbx
-DEST   = /usr/ucb/dbx
 DESTDIR        =
 DESTDIR        =
-
-LIBRARIES =
+DEST   = /usr/bin/dbx
 
 CC     = cc
 
 CC     = cc
-CFLAGS = # -g
+AS     = as
+#
+# if you want gripes
+# CFLAGS = -g '-DMAINTAINER="linton@shasta.stanford.edu"'
+#
+CFLAGS = -O # -g
+
+LD = cc
 LDFLAGS        = # -g
 LDFLAGS        = # -g
+LIBRARIES = # -lPW for IRIS (System V)
 
 OBJ = \
     y.tab.o \
 
 OBJ = \
     y.tab.o \
@@ -31,7 +37,9 @@ OBJ = \
     cerror.o \
     check.o \
     coredump.o \
     cerror.o \
     check.o \
     coredump.o \
+    debug.o \
     eval.o \
     eval.o \
+    fortran.o \
     keywords.o \
     languages.o \
     library.o \
     keywords.o \
     languages.o \
     library.o \
@@ -39,6 +47,7 @@ OBJ = \
     machine.o \
     main.o \
     mappings.o \
     machine.o \
     main.o \
     mappings.o \
+    modula-2.o \
     names.o \
     object.o \
     operators.o \
     names.o \
     object.o \
     operators.o \
@@ -48,6 +57,7 @@ OBJ = \
     runtime.o \
     scanner.o \
     source.o \
     runtime.o \
     scanner.o \
     source.o \
+    stabstring.o \
     symbols.o \
     tree.o \
     ops.o
     symbols.o \
     tree.o \
     ops.o
@@ -58,13 +68,16 @@ HDR = \
     c.h \
     check.h \
     coredump.h \
     c.h \
     check.h \
     coredump.h \
+    debug.h \
     eval.h \
     eval.h \
+    fortran.h \
     keywords.h \
     languages.h \
     lists.h \
     machine.h \
     main.h \
     mappings.h \
     keywords.h \
     languages.h \
     lists.h \
     machine.h \
     main.h \
     mappings.h \
+    modula-2.h \
     names.h \
     object.h \
     operators.h \
     names.h \
     object.h \
     operators.h \
@@ -72,50 +85,147 @@ HDR = \
     printsym.h \
     process.h \
     runtime.h \
     printsym.h \
     process.h \
     runtime.h \
-    source.h \
     scanner.h \
     scanner.h \
+    source.h \
+    stabstring.h \
     symbols.h \
     tree.h \
     ops.h
 
     symbols.h \
     tree.h \
     ops.h
 
+SRC = \
+    defs.h \
+    commands.y \
+    asm.c \
+    events.c \
+    c.c \
+    cerror.${MACHINE}.s \
+    check.c \
+    coredump.c \
+    debug.c \
+    eval.c \
+    fortran.c \
+    keywords.c \
+    languages.c \
+    library.c \
+    lists.c \
+    main.c \
+    mappings.c \
+    modula-2.c \
+    names.c \
+    object.c \
+    operators.c \
+    pascal.c \
+    printsym.c \
+    process.c \
+    scanner.c \
+    source.c \
+    stabstring.c \
+    symbols.c \
+    tree.c \
+    ${MACHINE}.c \
+    runtime.${MACHINE}.c \
+    ops.${MACHINE}.c
+
 .c.o:
        @echo "compiling $*.c"
        @${CC} ${CFLAGS} -c $*.c
 
 .s.o:
        @echo "assembling $*.s"
 .c.o:
        @echo "compiling $*.c"
        @${CC} ${CFLAGS} -c $*.c
 
 .s.o:
        @echo "assembling $*.s"
-       @${CC}  -c $*.s
+       @rm -f tmp
+       @cpp $*.s | egrep -v "^#" > tmp
+       @${AS} -o $*.o tmp
+       @rm -f tmp
 
 .c.h:
        ./makedefs -f $*.c $*.h
 
 
 .c.h:
        ./makedefs -f $*.c $*.h
 
-${AOUT}: makedefs ${HDR} ${OBJ}
+all ${AOUT}: makedefs mkdate ${HDR} ${OBJ}
+       @rm -f date.c
+       @./mkdate > date.c
        @echo "linking"
        @echo "linking"
-       @${CC} ${LDFLAGS} ${OBJ} ${LIBRARIES} -o ${AOUT}
+       @${CC} ${CFLAGS} -c date.c
+       @${LD} ${LDFLAGS} date.o ${OBJ} ${LIBRARIES} -o ${AOUT}
 
 profile: ${HDR} ${OBJ}
 
 profile: ${HDR} ${OBJ}
+       @rm -f date.c
+       @./mkdate > date.c
        @echo "linking with -p"
        @echo "linking with -p"
-       @${CC} ${LDFLAGS} -p ${OBJ} ${LIBRARIES} -o ${AOUT}
+       @${CC} ${LDFLAGS} -p date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
 
 y.tab.c: commands.y
 
 y.tab.c: commands.y
+       @echo "expect 2 shift/reduce conflicts"
        yacc -d commands.y
 
        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} makedefs.c library.o cerror.o -o makedefs
+       ${CC} -g makedefs.c library.o cerror.o -o makedefs
+
+mkdate: mkdate.c
+       ${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.
 #
 
 clean:
 #
 # Don't worry about the removal of header files, they're created from
 # the source files.
 #
 
 clean:
-       rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} core
+       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 \
+           cerror.s ops.c machine.c runtime.c date.o
+       @chdir tests; make clean
+
+cleandir: clean
+       rm -f dbx.0 tags .depend
+
+cleandefs:
+       rm -f ${HDR} y.tab.h
+
+testinstall: ${AOUT} test install
+
+test:
+       @cd tests; make
+
+install: ${AOUT} dbx.0
+       install -s -o bin -g bin -m 755 ${AOUT} ${DESTDIR}${DEST}
+       install -c -o bin -g bin -m 444 dbx.0 ${DESTDIR}/usr/man/cat1
 
 
-install:
-       install -s ${AOUT} ${DESTDIR}/${DEST}
+#
+# Create a tar file called "tape" containing relevant files.
+#
+
+TAPE = f tape
+
+tape:
+       @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