1 # $NetBSD: Makefile.inc,v 1.31 2009/02/18 15:21:52 christos Exp $
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
15 CPPFLAGS+= -DDSO_HANDLE
17 .if defined(HAVE_GCC) && ${HAVE_GCC} > 3
18 CFLAGS+= -fno-unit-at-a-time
23 .PATH: ${.CURDIR}/../common_elf
25 SRCS+= crt0.c crti.c crtn.c
26 OBJS+= crt0.o gcrt0.o crti.o crtn.o
35 ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
36 ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
38 .if ${MKSTRIPIDENT} != "no"
39 ${OBJCOPY} -R .ident ${.TARGET}
42 # dependant on crt0.o to pick up header dependencies
43 gcrt0.o: ${.CURDIR}/crt0.c crt0.o
45 ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
46 ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
48 .if ${MKSTRIPIDENT} != "no"
49 ${OBJCOPY} -R .ident ${.TARGET}
54 ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
55 ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
57 .if ${MKSTRIPIDENT} != "no"
58 ${OBJCOPY} -R .ident ${.TARGET}
63 ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
64 ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
66 .if ${MKSTRIPIDENT} != "no"
67 ${OBJCOPY} -R .ident ${.TARGET}
74 .include <bsd.prog.mk>