]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/csu/arm/Makefile
Merge clang trunk r366426, resolve conflicts, and update FREEBSD-Xlist.
[FreeBSD/FreeBSD.git] / lib / csu / arm / Makefile
1 # $FreeBSD$
2
3 .PATH: ${.CURDIR:H}/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:H}/common \
9                 -I${SRCTOP}/lib/libc/include
10 CFLAGS+=        -DCRT_IRELOC_SUPPRESS
11 STATIC_CFLAGS+= -mlong-calls
12
13 FILES=          ${OBJS}
14 FILESMODE=      ${LIBMODE}
15 FILESOWN=       ${LIBOWN}
16 FILESGRP=       ${LIBGRP}
17 FILESDIR=       ${LIBDIR}
18 # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
19 .undef LIBRARIES_ONLY
20
21 CLEANFILES=     ${OBJS}
22 CLEANFILES+=    crt1.s gcrt1.s Scrt1.s
23
24 # See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
25 # directly compiled to .o files.
26
27 crt1.s: crt1.c
28         ${CC} ${CFLAGS} ${STATIC_CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
29         sed ${SED_FIX_NOTE} ${.TARGET}
30
31 crt1.o: crt1.s
32         ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s
33
34 gcrt1.s: crt1.c
35         ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
36         sed ${SED_FIX_NOTE} ${.TARGET}
37
38 gcrt1.o: gcrt1.s
39         ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
40
41 Scrt1.s: crt1.c
42         ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
43         sed ${SED_FIX_NOTE} ${.TARGET}
44
45 Scrt1.o: Scrt1.s
46         ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
47
48 .include <bsd.lib.mk>