]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/csu/powerpc64/Makefile
Fix installation of 32bit libraries after r288074.
[FreeBSD/FreeBSD.git] / lib / csu / powerpc64 / 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                 -mlongcall
11
12 # XXX: See the log for r232932 as to why the above -mlongcall is needed.  Since
13 # clang doesn't support -mlongcall, and testing shows a clang linked with a
14 # clang-built csu segfaults, this must currently be compiled with gcc.  Once
15 # clang supports -mlongcall, or we get a fixed ld, this can be revisited.
16 CC:=            gcc
17 COMPILER_TYPE:= gcc
18
19 FILES=          ${OBJS}
20 FILESMODE=      ${LIBMODE}
21 FILESOWN=       ${LIBOWN}
22 FILESGRP=       ${LIBGRP}
23 FILESDIR=       ${LIBDIR}
24 # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
25 .undef LIBRARIES_ONLY
26
27 CLEANFILES=     ${OBJS}
28 CLEANFILES+=    crt1.s gcrt1.s Scrt1.s
29
30 # See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
31 # directly compiled to .o files.
32
33 crt1.s: crt1.c
34         ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
35         sed ${SED_FIX_NOTE} ${.TARGET}
36
37 crt1.o: crt1.s
38         ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
39
40 gcrt1.s: crt1.c
41         ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
42         sed ${SED_FIX_NOTE} ${.TARGET}
43
44 gcrt1.o: gcrt1.s
45         ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
46
47 Scrt1.s: crt1.c
48         ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
49         sed ${SED_FIX_NOTE} ${.TARGET}
50
51 Scrt1.o: Scrt1.s
52         ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
53
54 .include <bsd.lib.mk>