vm: fix failed alloc condition
[minix.git] / lib / csu / common_elf / Makefile.inc
blob3d9c631a21a630a8baeef01d703b6306960b459e
1 #       $NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
3 .if !defined(ELFSIZE)
4 ELFSIZE=32
5 .endif
7 .include "../../Makefile.inc"
9 .if defined(__MINIX) && ${MACHINE_ARCH} == "arm"
10 CPPFLAGS+=      -DLIBC_SCCS -DPIC -DELFSIZE=${ELFSIZE}
11 .else
12 CPPFLAGS+=      -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE}
13 .endif
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
18 CPPFLAGS+=      -DJCR
19 CPPFLAGS+=      -DDSO_HANDLE
21 .if defined(HAVE_GCC) && ${HAVE_GCC} > 3
22 CFLAGS+=        -fno-unit-at-a-time
23 .endif
25 .include <bsd.own.mk>
27 .PATH:          ${.CURDIR}/../common_elf
29 SRCS+=          crt0.c crti.c crtn.c
30 OBJS+=          crt0.o gcrt0.o crti.o crtn.o
31 .if ${MKPIC} != "no"
32 COPTS+=         -fPIC
33 .endif
35 realall: ${OBJS}
37 crt0.o: crt0.c
38         ${_MKTARGET_COMPILE}
39         ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
40         ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
41         rm -f ${.TARGET}.o
42 .if ${MKSTRIPIDENT} != "no"
43         ${OBJCOPY} -R .ident ${.TARGET}
44 .endif
46 # dependant on crt0.o to pick up header dependencies
47 gcrt0.o: ${.CURDIR}/crt0.c crt0.o
48         ${_MKTARGET_COMPILE}
49         ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
50         ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
51         rm -f ${.TARGET}.o
52 .if ${MKSTRIPIDENT} != "no"
53         ${OBJCOPY} -R .ident ${.TARGET}
54 .endif
56 crti.o: crti.c
57         ${_MKTARGET_COMPILE}
58         ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
59         ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
60         rm -f ${.TARGET}.o
61 .if ${MKSTRIPIDENT} != "no"
62         ${OBJCOPY} -R .ident ${.TARGET}
63 .endif
65 crtn.o: crtn.c
66         ${_MKTARGET_COMPILE}
67         ${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
68         ${LD} -X -r -o ${.TARGET} ${.TARGET}.o
69         rm -f ${.TARGET}.o
70 .if ${MKSTRIPIDENT} != "no"
71         ${OBJCOPY} -R .ident ${.TARGET}
72 .endif
74 FILES=${OBJS}
75 FILESDIR=${LIBDIR}
76 CLEANFILES=${OBJS}
78 .include <bsd.prog.mk>