sync
[bitrig.git] / lib / csu / hppa / Makefile
blob110a4b01465c5e27a32da74eda22710f3532f069
1 # $OpenBSD: Makefile,v 1.9 2011/11/08 10:37:09 guenther Exp $
2 # from: @(#)Makefile 5.5 (Berkeley) 5/21/91
4 OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
5 SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
7 ELFDIR= ${.CURDIR}/../common_elf
8 .PATH: ${ELFDIR}
9 CFLAGS+= -I${ELFDIR} -I${.CURDIR}
11 all: ${OBJS}
13 crt0.o: crt0.c
14 @echo ${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}
15 @${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}.o
16 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
17 @rm -f ${.TARGET}.o
19 gcrt0.o: crt0.c
20 @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
21 @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
22 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
23 @rm -f ${.TARGET}.o
25 crtbegin.o: crtbegin.c
26 @echo ${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}
27 @${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
28 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
29 @rm -f ${.TARGET}.o
31 crtbeginS.o: crtbeginS.c
32 @echo ${COMPILE.c} ${PICFLAG} -DPIC ${ELFDIR}/crtbeginS.c -o ${.TARGET}
33 @${COMPILE.c} ${PICFLAG} -DPIC ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
34 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
35 @rm -f ${.TARGET}.o
37 crtend.o: crtend.c
38 @echo ${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}
39 @${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}.o
40 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
41 @rm -f ${.TARGET}.o
43 crtendS.o: crtendS.c
44 @echo ${COMPILE.c} ${PICFLAG} -DPIC ${ELFDIR}/crtendS.c -o ${.TARGET}
45 @${COMPILE.c} ${PICFLAG} -DPIC ${ELFDIR}/crtendS.c -o ${.TARGET}.o
46 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
47 @rm -f ${.TARGET}.o
49 realinstall:
50 ${INSTALL} ${INSTALL_COPY} -S -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
51 ${DESTDIR}/usr/lib
53 afterdepend:: .depend
54 @(TMP=/tmp/_depend$$$$; \
55 sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
56 < .depend > $$TMP; \
57 mv $$TMP .depend)
59 .include <bsd.prog.mk>