file reorg
[unix-history] / usr / src / usr.bin / pascal / px / Makefile
index 9cecffb..9451958 100644 (file)
@@ -3,15 +3,15 @@
 # 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.7 (Berkeley) %G%
 #
 #
-SCCSID = "@(#)Makefile 5.6 %G%"
+SCCSID = "@(#)Makefile 5.7 %G%"
 
 DESTDIR =
 
 DESTDIR =
-BINDIR = /usr/ucb
+BINDIR = /usr/bin
 LIBDIR = /usr/lib
 SRCDIR = ../src
 LIBDIR = /usr/lib
 SRCDIR = ../src
-LIBPCDIR = ../../../usr.lib/libpc
+LIBPCDIR = ../../../lib/libpc
 CC = cc
 CFLAGS = -O ${INCLUDES}
 INCLUDES = -I${SRCDIR} -I${LIBPCDIR}
 CC = cc
 CFLAGS = -O ${INCLUDES}
 INCLUDES = -I${SRCDIR} -I${LIBPCDIR}
@@ -31,7 +31,7 @@ PXUTL =       version.c
 .c.o:
        ${CC} ${CFLAGS} -c $*.c
 
 .c.o:
        ${CC} ${CFLAGS} -c $*.c
 
-px: Version.c ${PXOBJ}
+all px: Version.c ${PXOBJ}
        ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
 
 lint: Version.c ${PXSRC}
        ${CC} ${CFLAGS} -o px Version.c ${PXOBJ} -lpc -lm
 
 lint: Version.c ${PXSRC}
@@ -48,13 +48,13 @@ h02opcs.h: ${SRCDIR}/OPnames.h opc.c
        ${RM} opc
 
 install: px
        ${RM} opc
 
 install: px
-       install -s px ${DESTDIR}/usr/ucb/px
+       install -s px ${DESTDIR}/usr/bin/px
 
 sources: ${PXHDR} ${PXSRC} ${PXUTL}
 ${PSHDR}:
        ln -s ${SRCDIR}/$@ $@
 
 
 sources: ${PXHDR} ${PXSRC} ${PXUTL}
 ${PSHDR}:
        ln -s ${SRCDIR}/$@ $@
 
-clean:
+cleandir clean:
        ${RM} *.o *.s px version opc* pic*
        ${RM} h02opcs.h errs lpr core tmp
 
        ${RM} *.o *.s px version opc* pic*
        ${RM} h02opcs.h errs lpr core tmp
 
@@ -70,46 +70,12 @@ grind: sources
        ${RM} index pic lst
 
 depend:        sources
        ${RM} index pic lst
 
 depend:        sources
-       ls *.c | sed 's;^\(.*\)\.c;\1.o: \1.c;' >makedep
+       ls *.c | sed 's;^\(.*\)\.c;\1.o: \1.c;' >.depend
        grep '^#[       ]*include' *.c | sed \
                -e '/<.*>/d' \
                -e 's;:[^"]*"\([^"]*\)".*;: \1;' \
                -e 's/\.c/\.o/' \
                -e 's;: libpc.h;: ${LIBPCDIR}/libpc.h;' \
                -e 's;: objfmt.h;: ${SRCDIR}/objfmt.h;' \
        grep '^#[       ]*include' *.c | sed \
                -e '/<.*>/d' \
                -e 's;:[^"]*"\([^"]*\)".*;: \1;' \
                -e 's/\.c/\.o/' \
                -e 's;: libpc.h;: ${LIBPCDIR}/libpc.h;' \
                -e 's;: objfmt.h;: ${SRCDIR}/objfmt.h;' \
-               -e 's;: OPnames.h;: ${SRCDIR}/OPnames.h;' >>makedep
-       echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
-       echo '$$r makedep' >>eddep
-       echo 'w' >>eddep
-       cp Makefile Makefile.bak
-       ed - Makefile < eddep
-       rm eddep makedep
-       echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
-       echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
-       echo '# see make depend above' >> Makefile
-
-# DO NOT DELETE THIS LINE -- make depend uses it
-# DEPENDENCIES MUST END AT END OF FILE
-Version.o: Version.c
-int.o: int.c
-interp.o: interp.c
-opc.o: opc.c
-utilities.o: utilities.c
-version.o: version.c
-int.o: whoami.h
-int.o: vars.h
-int.o: ../../../usr.lib/libpc/libpc.h
-int.o: ../src/objfmt.h
-interp.o: whoami.h
-interp.o: vars.h
-interp.o: ../src/objfmt.h
-interp.o: h02opcs.h
-interp.o: machdep.h
-interp.o: ../../../usr.lib/libpc/libpc.h
-opc.o: ../src/OPnames.h
-utilities.o: whoami.h
-utilities.o: vars.h
-utilities.o: ../src/objfmt.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
+               -e 's;: OPnames.h;: ${SRCDIR}/OPnames.h;' >>.depend
+