1 # $NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt 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
18 COPTS+= -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 # dependent 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} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
55 ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
57 .if ${MKSTRIPIDENT} != "no"
58 ${OBJCOPY} -R .ident ${.TARGET}
63 ${COMPILE.c} -DCRTN ${.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>