port to tahoe by Nir peleg of CCI
[unix-history] / usr / src / usr.bin / pascal / pdx / Makefile
index 34ec5b5..d7ba752 100644 (file)
@@ -1,6 +1,8 @@
-# Copyright (c) 1982 Regents of the University of California
+# Copyright (c) 1982 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
 #
 #
-#      @(#)Makefile    1.13    (Berkeley)      %G%
+#      @(#)Makefile    1.18 (Berkeley) %G%
 #
 # make file for pdx
 #
 #
 # make file for pdx
 #
@@ -29,21 +31,18 @@ SRCDIR      = ../src/
 INSTALL        = ${DESTDIR}/usr/ucb/pdx
 
 RM     = /bin/rm -f
 INSTALL        = ${DESTDIR}/usr/ucb/pdx
 
 RM     = /bin/rm -f
-CFLAGS = -Disvaxpx -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O
+CFLAGS = -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O
+LINTFLAGS= -I. -I${SRCDIR} -DOBJ -DADDR32
 LDFLAGS        = # -i for pdp-11
 
 .c.o:
        @echo "compiling $*.c"
        @csh -f -c ' \
            set a=$*.c; \
 LDFLAGS        = # -i for pdp-11
 
 .c.o:
        @echo "compiling $*.c"
        @csh -f -c ' \
            set a=$*.c; \
-           if ($$a:h != $$a) chdir $$a:h; \
+           if ($$a:h != $$a) cd $$a:h; \
            ${CC} ${CFLAGS} -c $$a:t \
        '
 
            ${CC} ${CFLAGS} -c $$a:t \
        '
 
-.s.o:
-       @echo "assembling $*.s"
-       @cc -c $*.s
-
 #
 # source directory specifications
 #
 #
 # source directory specifications
 #
@@ -101,8 +100,7 @@ MACHOBJ =\
        ${MACHINE}optab.o\
        ${MACHINE}printdata.o\
        ${MACHINE}printerror.o\
        ${MACHINE}optab.o\
        ${MACHINE}printdata.o\
        ${MACHINE}printerror.o\
-       ${MACHINE}printinst.o\
-       ${MACHINE}pxerrors.o
+       ${MACHINE}printinst.o
 
 PROCOBJ =\
        ${PROCESS}runcont.o\
 
 PROCOBJ =\
        ${PROCESS}runcont.o\
@@ -155,12 +153,21 @@ profile: ${OBJS}
        @echo "linking with -p"
        @cc ${LDFLAGS} -p ${OBJS} ${LIB}
 
        @echo "linking with -p"
        @cc ${LDFLAGS} -p ${OBJS} ${LIB}
 
+lint:
+       @cd ${COMMAND}; yacc -d grammar.yacc; lex token.lex
+       -@lint ${LINTFLAGS} `echo ${OBJS} library.c | sed 's/\.o/.c/g'`
+       @${RM} ${COMMAND}lex.yy.c ${COMMAND}y.tab.c
+
+cerror.o:
+       @echo "assembling `machine`/$*.s"
+       @cc -c `machine`/$*.s
+
 ${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
 ${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
-       chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
+       cd ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
        ${RM} ${COMMAND}y.tab.c
 
 ${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
        ${RM} ${COMMAND}y.tab.c
 
 ${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
-       chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
+       cd ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
        ${RM} ${COMMAND}lex.yy.c
 
 ${BPOBJ}:      ${BREAKPOINT}bp.rep
        ${RM} ${COMMAND}lex.yy.c
 
 ${BPOBJ}:      ${BREAKPOINT}bp.rep
@@ -172,10 +179,10 @@ ${OBJOBJ}:        ${OBJECT}objsym.rep
 ${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h
 
 install: a.out
 ${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h
 
 install: a.out
-       mv a.out ${INSTALL}
+       install -s a.out ${INSTALL}
 
 clean:
 
 clean:
-       ${RM} a.out */*.o
+       ${RM} a.out *.o */*.o
 
 #
 # Warning:  This will produce a very long listing.  You would be better
 
 #
 # Warning:  This will produce a very long listing.  You would be better