summaryrefslogtreecommitdiff
path: root/lib/csu/hppa
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 /lib/csu/hppa
parente8974de17ca54835c83e6c68c9c8697ea33d0df0 (diff)
Fix dependancy building for ELF startup code. Changed Makefiles
to build startup code the same on all (ELF) archs. hppa ok mickey@
Diffstat (limited to 'lib/csu/hppa')
-rw-r--r--lib/csu/hppa/Makefile41
1 files changed, 25 insertions, 16 deletions
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>