]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/csu/powerpc64/Makefile
Update libucl to git version 8d3b186
[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 all: ${OBJS}
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} -S -o ${.TARGET} ${.CURDIR}/crt1.c
29         sed ${SED_FIX_NOTE} ${.TARGET}
30
31 crt1.o: crt1.s
32         ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
33
34 gcrt1.s: crt1.c
35         ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
36         sed ${SED_FIX_NOTE} ${.TARGET}
37
38 gcrt1.o: gcrt1.s
39         ${CC} ${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} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
47
48 realinstall:
49         ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
50             ${OBJS} ${DESTDIR}${LIBDIR}
51
52 .include <bsd.lib.mk>