BSD 4_3_Net_2 release
[unix-history] / usr / src / lib / csu.i386 / Makefile
index 692437c..a63d9dc 100644 (file)
@@ -1,25 +1,33 @@
-#      @(#)Makefile    5.3 (Berkeley) 5/14/90
+#      @(#)Makefile    5.6 (Berkeley) 5/22/91
 
 CFLAGS=        -O -DLIBC_SCCS
 
 CFLAGS=        -O -DLIBC_SCCS
-OBJS=  crt0.o
+OBJS=  crt0.o gcrt0.o
+CLEANFILES+=   gmon.o moncrt0.o core a.out
 
 all: ${OBJS}
 
 crt0.o: crt0.c
 
 all: ${OBJS}
 
 crt0.o: crt0.c
-       ${CC} -S -DCRT0 ${.ALLSRC}
-       grep -v "^#[ _]" < ${.PREFIX}.s > x.s
-       ed x.s < :fix
-       mv x.s ${.PREFIX}.s
-       ${CPP} -traditional crt0.s > x.s
-       ${AS} -o x.o x.s
-       ${LD} -x -r -o crt0.o x.o
-       rm -f x.s x.o crt0.s
+       ${CC} -c -DCRT0 ${.ALLSRC}
+       ${LD} -x -r ${.TARGET}
+       mv a.out ${.TARGET}
+
+moncrt0.o: crt0.c
+       ${CC} -c -DMCRT0 ${.ALLSRC} -o ${.TARGET}
+       ${LD} -x -r ${.TARGET}
+       mv a.out ${.TARGET}
+
+gcrt0.o: moncrt0.o gmon.o
+       ${LD} -x -r -o ${.TARGET} moncrt0.o gmon.o
+
+gmon.o: gmon.c gmon.h
+       ${CC} -c ${DEFS} ${.IMPSRC}
+       ${LD} -x -r ${.TARGET}
+       mv a.out ${.TARGET}
 
 install:
        install -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
            ${DESTDIR}/usr/lib
 
 
 install:
        install -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
            ${DESTDIR}/usr/lib
 
-cleandir clean:
-       rm -f ${OBJS} gmon.o mon.o moncrt0.o core a.out x.s x.o crt0.s
-
 depend lint tags:
 depend lint tags:
+
+.include <bsd.prog.mk>