sync
[bitrig.git] / lib / csu / alpha / Makefile
blob1c688ccf8dea21c286139c55e4f04824e401b672
1 # $OpenBSD: Makefile,v 1.20 2011/11/08 10:37:09 guenther Exp $
2 # $NetBSD: Makefile,v 1.6 1996/10/18 05:27:38 thorpej Exp $
4 CFLAGS+= -DELFSIZE=64
5 OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
6 SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
8 ELFDIR= ${.CURDIR}/../common_elf
9 .PATH: ${ELFDIR}
10 CFLAGS+= -I${ELFDIR} -I${.CURDIR}
12 all: ${OBJS}
14 crt0.o: crt0.c
15 @echo ${COMPILE.c} -DCRT0 -fPIE ${.CURDIR}/crt0.c -o ${.TARGET}
16 @${COMPILE.c} -DCRT0 -fPIE ${.CURDIR}/crt0.c -o ${.TARGET}.o
17 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
18 @rm -f ${.TARGET}.o
20 gcrt0.o: crt0.c
21 @echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
22 @${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
23 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
24 @rm -f ${.TARGET}.o
26 crtbegin.o: crtbegin.c
27 @echo ${COMPILE.c} -fPIE ${ELFDIR}/crtbegin.c -o ${.TARGET}
28 @${COMPILE.c} -fPIE ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
29 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
30 @rm -f ${.TARGET}.o
32 crtbeginS.o: crtbeginS.c
33 @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
34 @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
35 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
36 @rm -f ${.TARGET}.o
38 crtend.o: crtend.c
39 @echo ${COMPILE.c} -fPIE ${ELFDIR}/crtend.c -o ${.TARGET}
40 @${COMPILE.c} -fPIE ${ELFDIR}/crtend.c -o ${.TARGET}.o
41 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
42 @rm -f ${.TARGET}.o
44 crtendS.o: crtendS.c
45 @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
46 @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o
47 @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
48 @rm -f ${.TARGET}.o
50 realinstall:
51 ${INSTALL} ${INSTALL_COPY} -S -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
52 ${DESTDIR}/usr/lib
54 afterdepend:: .depend
55 @(TMP=/tmp/_depend$$$$; \
56 sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o:/' \
57 < .depend > $$TMP; \
58 mv $$TMP .depend)
60 .include <bsd.prog.mk>