__aeabi_ldivmod: fix sign logic
[minix.git] / lib / csu / common_elf / Makefile.inc
blob08df8b60de8e32c61fb970b2013966d039675d33
1 #       $NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $
3 .if !defined(ELFSIZE)
4 ELFSIZE=32
5 .endif
7 .include "../../Makefile.inc"
9 CPPFLAGS+=      -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE}
10 CPPFLAGS+=      -I${NETBSDSRCDIR}/libexec/ld.elf_so
11 CPPFLAGS+=      -I${.CURDIR}/../common_elf
12 CPPFLAGS+=      -I${NETBSDSRCDIR}/lib/libc/dlfcn
13 CPPFLAGS+=      -DDWARF2_EH
14 CPPFLAGS+=      -DJCR
15 CPPFLAGS+=      -DDSO_HANDLE
17 .if defined(HAVE_GCC)
18 COPTS+=         -fno-unit-at-a-time
19 .endif
21 .include <bsd.own.mk>
23 .PATH:          ${.CURDIR}/../common_elf
25 SRCS+=          crt0.c crti.c crtn.c
26 OBJS+=          crt0.o gcrt0.o crti.o crtn.o
27 .if ${MKPIC} != "no"
28 COPTS+=         -fPIC
29 .endif
31 realall: ${OBJS}
33 crt0.o: crt0.c
34         ${_MKTARGET_COMPILE}
35         ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
36         ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
37         rm -f ${.TARGET}.o
38 .if ${MKSTRIPIDENT} != "no"
39         ${OBJCOPY} -R .ident ${.TARGET}
40 .endif
42 # dependent on crt0.o to pick up header dependencies
43 gcrt0.o: ${.CURDIR}/crt0.c crt0.o
44         ${_MKTARGET_COMPILE}
45         ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
46         ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
47         rm -f ${.TARGET}.o
48 .if ${MKSTRIPIDENT} != "no"
49         ${OBJCOPY} -R .ident ${.TARGET}
50 .endif
52 crti.o: crti.c
53         ${_MKTARGET_COMPILE}
54         ${COMPILE.c} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
55         ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
56         rm -f ${.TARGET}.o
57 .if ${MKSTRIPIDENT} != "no"
58         ${OBJCOPY} -R .ident ${.TARGET}
59 .endif
61 crtn.o: crtn.c
62         ${_MKTARGET_COMPILE}
63         ${COMPILE.c} -DCRTN ${.IMPSRC} -o ${.TARGET}.o
64         ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
65         rm -f ${.TARGET}.o
66 .if ${MKSTRIPIDENT} != "no"
67         ${OBJCOPY} -R .ident ${.TARGET}
68 .endif
70 FILES=${OBJS}
71 FILESDIR=${LIBDIR}
72 CLEANFILES=${OBJS}
74 .include <bsd.prog.mk>