1 # $NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
7 .include "../../Makefile.inc"
9 .if defined(__MINIX) && ${MACHINE_ARCH} == "arm"
10 CPPFLAGS+= -DLIBC_SCCS -DPIC -DELFSIZE=${ELFSIZE}
12 CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE}
14 CPPFLAGS+= -I${NETBSDSRCDIR}/libexec/ld.elf_so
15 CPPFLAGS+= -I${.CURDIR}/../common_elf
16 CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libc/dlfcn
17 CPPFLAGS+= -DDWARF2_EH
19 CPPFLAGS+= -DDSO_HANDLE
21 .if defined(HAVE_GCC) && ${HAVE_GCC} > 3
22 CFLAGS+= -fno-unit-at-a-time
27 .PATH: ${.CURDIR}/../common_elf
29 SRCS+= crt0.c crti.c crtn.c
30 OBJS+= crt0.o gcrt0.o crti.o crtn.o
39 ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
40 ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
42 .if ${MKSTRIPIDENT} != "no"
43 ${OBJCOPY} -R .ident ${.TARGET}
46 # dependant on crt0.o to pick up header dependencies
47 gcrt0.o: ${.CURDIR}/crt0.c crt0.o
49 ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
50 ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
52 .if ${MKSTRIPIDENT} != "no"
53 ${OBJCOPY} -R .ident ${.TARGET}
58 ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
59 ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
61 .if ${MKSTRIPIDENT} != "no"
62 ${OBJCOPY} -R .ident ${.TARGET}
67 ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
68 ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
70 .if ${MKSTRIPIDENT} != "no"
71 ${OBJCOPY} -R .ident ${.TARGET}
78 .include <bsd.prog.mk>