]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - lib/csu/ia64/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / lib / csu / ia64 / Makefile
1 # $FreeBSD$
2
3 .PATH: ${.CURDIR}/../common
4
5 SRCS=           crti.S crtn.S
6 OBJS=           ${SRCS:N*.h:R:S/$/.o/g}
7 OBJS+=          crt1.o gcrt1.o Scrt1.o
8
9 all: ${OBJS}
10
11 CLEANFILES=     ${OBJS}
12 CLEANFILES+=    crt1_.o gcrt1_.o Scrt1_.o
13 CLEANFILES+=    crtbrand.o gcrtbrand.o Scrtbrand.o
14 CLEANFILES+=    crtbrand.s gcrtbrand.s Scrtbrand.s
15
16 crt1_.o: crt1.S
17         ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
18
19 # See the comment in lib/csu/common/crtbrand.c for the reason crtbrand.c is not
20 # directly compiled to .o files.
21
22 crtbrand.s: crtbrand.c
23         ${CC} ${CFLAGS} -S -o ${.TARGET} ${.ALLSRC}
24         sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
25
26 crtbrand.o: crtbrand.s
27         ${CC} ${ACFLAGS} -c -o ${.TARGET} crtbrand.s
28
29 crt1.o: crt1_.o crtbrand.o
30         ${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o
31
32 gcrt1_.o: crt1.S
33         ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC}
34
35 gcrtbrand.s: crtbrand.c
36         ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.ALLSRC}
37         sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
38
39 gcrtbrand.o: gcrtbrand.s
40         ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrtbrand.s
41
42 gcrt1.o: gcrt1_.o gcrtbrand.o
43         ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC}
44
45 Scrt1_.o: crt1.S
46         ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC}
47
48 Scrtbrand.s: crtbrand.c
49         ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.ALLSRC}
50         sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
51
52 Scrtbrand.o: Scrtbrand.s
53         ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrtbrand.s
54
55 Scrt1.o: Scrt1_.o Scrtbrand.o
56         ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC}
57
58 realinstall:
59         ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
60             ${OBJS} ${DESTDIR}${LIBDIR}
61
62 .include <bsd.lib.mk>