file reorg, pathnames.h, paths.h
[unix-history] / usr / src / old / dbx / Makefile
index e7f57f3..151a50c 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.6 (Berkeley) %G%
+#      @(#)Makefile    5.15 (Berkeley) %G%
 #
 # make file for debugger "dbx"
 #
 #
 # make file for debugger "dbx"
 #
 #
 
 .SUFFIXES:
 #
 
 .SUFFIXES:
-.SUFFIXES: .h .c .s .o
+.SUFFIXES: .h .c .s .o .1 .0
 
 
-MACHINE        = unknown
 AOUT   = tdbx
 DESTDIR        =
 AOUT   = tdbx
 DESTDIR        =
-DEST   = /usr/ucb/dbx
-
-# Install the mail address of the person maintaining dbx below
-# as -DMAINTAINER.  A null string disables gripes.
+DEST   = /usr/bin/dbx
 
 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 \
@@ -135,12 +132,15 @@ SRC = \
 
 .s.o:
        @echo "assembling $*.s"
 
 .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 mkdate ${HDR} ${OBJ}
+all ${AOUT}: makedefs mkdate ${HDR} ${OBJ}
        @rm -f date.c
        @./mkdate > date.c
        @echo "linking"
        @rm -f date.c
        @./mkdate > date.c
        @echo "linking"
@@ -174,14 +174,16 @@ runtime.c: runtime.${MACHINE}.c
        @ln -s runtime.${MACHINE}.c runtime.c
 
 makedefs: makedefs.c library.o cerror.o
        @ln -s runtime.${MACHINE}.c runtime.c
 
 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.
@@ -190,7 +192,11 @@ print:
 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 \
 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 \
-           cerror.s ops.c machine.c runtime.c
+           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
 
 cleandefs:
        rm -f ${HDR} y.tab.h
@@ -198,21 +204,28 @@ cleandefs:
 testinstall: ${AOUT} test install
 
 test:
 testinstall: ${AOUT} test install
 
 test:
-       @chdir tests; make
+       @cd tests; make
 
 
-install: ${AOUT}
-       install -s ${AOUT} ${DESTDIR}/${DEST}
+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
 
 #
 # 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