summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-05-30 19:03:25 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-05-30 19:03:25 +0000
commit12a0f955b6f514f264850c67cb8b8d5d6116cc1e (patch)
tree47477d767c4b2192d8bf0106cb5afb1559ddc6a9
parente8974de17ca54835c83e6c68c9c8697ea33d0df0 (diff)
Fix dependancy building for ELF startup code. Changed Makefiles
to build startup code the same on all (ELF) archs. hppa ok mickey@
-rw-r--r--lib/csu/alpha/Makefile37
-rw-r--r--lib/csu/hppa/Makefile41
-rw-r--r--lib/csu/i386/Makefile42
-rw-r--r--lib/csu/powerpc/Makefile62
-rw-r--r--lib/csu/sparc/Makefile34
-rw-r--r--lib/csu/sparc64/Makefile37
6 files changed, 157 insertions, 96 deletions
diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile
index ff495418a97..687ac1892da 100644
--- a/lib/csu/alpha/Makefile
+++ b/lib/csu/alpha/Makefile
@@ -1,46 +1,51 @@
-# $OpenBSD: Makefile,v 1.12 2001/05/29 07:34:30 deraadt Exp $
+# $OpenBSD: Makefile,v 1.13 2003/05/30 19:03:24 drahn Exp $
# $NetBSD: Makefile,v 1.6 1996/10/18 05:27:38 thorpej Exp $
-CFLAGS+= -DLIBC_SCCS -DPIC -DELFSIZE=64
-
+CFLAGS+= -DLIBC_SCCS -DELFSIZE=64
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
-CLEANFILES+= core a.out
-
-.PATH: ${.CURDIR}/../common_elf
-CFLAGS+= -I${.CURDIR}/../common_elf
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
PICFLAG?=-fpic
all: ${OBJS}
crt0.o: crt0.c
- ${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbeginS.o: crtbeginS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtendS.o: crtendS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -48,4 +53,10 @@ realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
+afterdepend:: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
+
.include <bsd.prog.mk>
diff --git a/lib/csu/hppa/Makefile b/lib/csu/hppa/Makefile
index ad1f0b3b666..052e293925c 100644
--- a/lib/csu/hppa/Makefile
+++ b/lib/csu/hppa/Makefile
@@ -1,48 +1,51 @@
-# $OpenBSD: Makefile,v 1.2 2002/11/10 22:49:54 mickey Exp $
+# $OpenBSD: Makefile,v 1.3 2003/05/30 19:03:24 drahn Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
-CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
-OBJS= crt0.o scrt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+CFLAGS+= -DLIBC_SCCS
+OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
-.PATH: ${.CURDIR}/../common_elf
-CFLAGS+= -I${.CURDIR}/../common_elf
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
#PICFLAG?=-fPIC
all: ${OBJS}
crt0.o: crt0.c
- ${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
- @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
- @rm -f ${.TARGET}.o
-
-scrt0.o: crt0.c
- ${COMPILE.c} -DSCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbeginS.o: crtbeginS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtendS.o: crtendS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -50,4 +53,10 @@ realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
+afterdepend:: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
+
.include <bsd.prog.mk>
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index 6e776e3f6f2..234e9f70a87 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,43 +1,51 @@
-# $OpenBSD: Makefile,v 1.7 2003/04/17 03:44:59 drahn Exp $
+# $OpenBSD: Makefile,v 1.8 2003/05/30 19:03:24 drahn Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
-CFLAGS+= -fno-omit-frame-pointer -DLIBC_SCCS -I${.CURDIR}/..
+CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
-PICFLAG?=-fpic
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
-.PATH: ${.CURDIR}/../common_elf
-CFLAGS+= -I${.CURDIR}/../common_elf
+PICFLAG?=-fpic
all: ${OBJS}
crt0.o: crt0.c
- ${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbeginS.o: crtbeginS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtendS.o: crtendS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -45,6 +53,10 @@ realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
-depend:
+afterdepend: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
.include <bsd.prog.mk>
diff --git a/lib/csu/powerpc/Makefile b/lib/csu/powerpc/Makefile
index 9766689394d..3d5a9b89d1a 100644
--- a/lib/csu/powerpc/Makefile
+++ b/lib/csu/powerpc/Makefile
@@ -2,57 +2,61 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/1/93
CFLAGS+= -DLIBC_SCCS
-OBJS= crt0.o gcrt0.o scrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
-PICFLAG?=-fpic
+OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
+
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
-CLEANFILES+= core a.out
-.PATH: ${.CURDIR}/../common_elf
+PICFLAG?=-fpic
all: ${OBJS}
crt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DCRT0 ${.ALLSRC} -o $@
- @${LD} -x -r ${.TARGET}
- @mv a.out ${.TARGET}
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DMCRT0 ${.ALLSRC} -o $@
- @${LD} -x -r ${.TARGET}
- @mv a.out ${.TARGET}
-
-scrt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DSRT0 ${.ALLSRC} -o $@
- @${LD} -x -r ${.TARGET}
- @mv a.out ${.TARGET}
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
- @${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
-
-crtend.o: crtend.c
- @echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
- @${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
+
+crtbeginS.o: crtbeginS.c
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
-crtbeginS.o: crtbeginS.c
- @echo ${CC} ${PICFLAG} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
- @${CC} ${PICFLAG} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
+crtend.o: crtend.c
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
-
+
crtendS.o: crtendS.c
- @echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
- @${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
- ${DESTDIR}/usr/lib
+ ${DESTDIR}/usr/lib
-depend lint tags:
+afterdepend:: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
.include <bsd.prog.mk>
diff --git a/lib/csu/sparc/Makefile b/lib/csu/sparc/Makefile
index 35798c785af..4da9d6b939d 100644
--- a/lib/csu/sparc/Makefile
+++ b/lib/csu/sparc/Makefile
@@ -1,43 +1,51 @@
-# $OpenBSD: Makefile,v 1.6 2002/08/11 22:58:06 art Exp $
+# $OpenBSD: Makefile,v 1.7 2003/05/30 19:03:24 drahn Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
-CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
+CFLAGS+= -DLIBC_SCCS
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
-.PATH: ${.CURDIR}/../common_elf
-CFLAGS+= -I${.CURDIR}/../common_elf
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
PICFLAG?=-fPIC
all: ${OBJS}
crt0.o: crt0.c
- ${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbeginS.o: crtbeginS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtendS.o: crtendS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -45,4 +53,10 @@ realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
+afterdepend:: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
+
.include <bsd.prog.mk>
diff --git a/lib/csu/sparc64/Makefile b/lib/csu/sparc64/Makefile
index a7c3c7a7524..27b8c5d3076 100644
--- a/lib/csu/sparc64/Makefile
+++ b/lib/csu/sparc64/Makefile
@@ -1,46 +1,51 @@
-# $OpenBSD: Makefile,v 1.1 2001/08/29 02:26:09 art Exp $
+# $OpenBSD: Makefile,v 1.2 2003/05/30 19:03:24 drahn Exp $
# $NetBSD: Makefile,v 1.6 1996/10/18 05:27:38 thorpej Exp $
-CFLAGS+= -DLIBC_SCCS -DPIC -DELFSIZE=64
-
+CFLAGS+= -DLIBC_SCCS -DELFSIZE=64
OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
-CLEANFILES+= core a.out
-
-.PATH: ${.CURDIR}/../common_elf
-CFLAGS+= -I${.CURDIR}/../common_elf
+ELFDIR= ${.CURDIR}/../common_elf
+.PATH: ${ELFDIR}
+CFLAGS+= -I${ELFDIR}
PICFLAG?=-fpic
all: ${OBJS}
crt0.o: crt0.c
- ${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
gcrt0.o: crt0.c
- ${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtbeginS.o: crtbeginS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
crtendS.o: crtendS.c
- ${COMPILE.c} ${PICFLAG} ${.ALLSRC} -o ${.TARGET}.o
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -48,4 +53,10 @@ realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
${DESTDIR}/usr/lib
+afterdepend:: .depend
+ @(TMP=/tmp/_depend$$$$; \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
+ < .depend > $$TMP; \
+ mv $$TMP .depend)
+
.include <bsd.prog.mk>