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