| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile.inc,v 1.30.10.1 2009/09/01 23:09:14 matt Exp $ | | 1 | # $NetBSD: Makefile.inc,v 1.30.10.2 2014/01/11 00:23:41 matt Exp $ |
2 | | | 2 | |
3 | .include <bsd.own.mk> | | 3 | .include <bsd.own.mk> |
4 | | | 4 | |
5 | .if !defined(ELFSIZE) | | 5 | .if !defined(ELFSIZE) |
6 | ELFSIZE=32 | | 6 | ELFSIZE=32 |
7 | .endif | | 7 | .endif |
8 | | | 8 | |
9 | .include "../../Makefile.inc" | | 9 | .include "../../Makefile.inc" |
10 | | | 10 | |
11 | CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE} | | 11 | CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE} |
12 | CPPFLAGS+= -I${NETBSDSRCDIR}/libexec/ld.elf_so | | 12 | CPPFLAGS+= -I${NETBSDSRCDIR}/libexec/ld.elf_so |
13 | CPPFLAGS+= -I${.CURDIR}/../common_elf | | 13 | CPPFLAGS+= -I${.CURDIR}/../common_elf |
14 | CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libc/dlfcn | | 14 | CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libc/dlfcn |
| @@ -23,36 +23,36 @@ CFLAGS+= -fno-unit-at-a-time | | | @@ -23,36 +23,36 @@ CFLAGS+= -fno-unit-at-a-time |
23 | .PATH: ${.CURDIR}/../common_elf | | 23 | .PATH: ${.CURDIR}/../common_elf |
24 | | | 24 | |
25 | SRCS+= crt0.c crti.c crtn.c | | 25 | SRCS+= crt0.c crti.c crtn.c |
26 | OBJS+= crt0.o gcrt0.o crti.o crtn.o | | 26 | OBJS+= crt0.o gcrt0.o crti.o crtn.o |
27 | .if ${MKPIC} != "no" | | 27 | .if ${MKPIC} != "no" |
28 | COPTS+= -fPIC | | 28 | COPTS+= -fPIC |
29 | .endif | | 29 | .endif |
30 | | | 30 | |
31 | realall: ${OBJS} | | 31 | realall: ${OBJS} |
32 | | | 32 | |
33 | crt0.o: crt0.c | | 33 | crt0.o: crt0.c |
34 | ${_MKTARGET_COMPILE} | | 34 | ${_MKTARGET_COMPILE} |
35 | ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET} | | 35 | ${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET} |
36 | ${OBJCOPY} -x ${.TARGET} | | 36 | ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} |
37 | | | 37 | |
38 | # dependant on crt0.o to pick up header dependencies | | 38 | # dependant on crt0.o to pick up header dependencies |
39 | gcrt0.o: ${.CURDIR}/crt0.c crt0.o | | 39 | gcrt0.o: ${.CURDIR}/crt0.c crt0.o |
40 | ${_MKTARGET_COMPILE} | | 40 | ${_MKTARGET_COMPILE} |
41 | ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET} | | 41 | ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET} |
42 | ${OBJCOPY} -x ${.TARGET} | | 42 | ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} |
43 | | | 43 | |
44 | crti.o: crti.c | | 44 | crti.o: crti.c |
45 | ${_MKTARGET_COMPILE} | | 45 | ${_MKTARGET_COMPILE} |
46 | ${COMPILE.c} ${.IMPSRC} -o ${.TARGET} | | 46 | ${COMPILE.c} ${.IMPSRC} -o ${.TARGET} |
47 | ${OBJCOPY} -X ${.TARGET} | | 47 | ${OBJCOPY} ${OBJCOPYLIBFLAGS} -X ${.TARGET} |
48 | | | 48 | |
49 | crtn.o: crtn.c | | 49 | crtn.o: crtn.c |
50 | ${_MKTARGET_COMPILE} | | 50 | ${_MKTARGET_COMPILE} |
51 | ${COMPILE.c} ${.IMPSRC} -o ${.TARGET} | | 51 | ${COMPILE.c} ${.IMPSRC} -o ${.TARGET} |
52 | ${OBJCOPY} -X ${.TARGET} | | 52 | ${OBJCOPY} ${OBJCOPYLIBFLAGS} -X ${.TARGET} |
53 | | | 53 | |
54 | FILES=${OBJS} | | 54 | FILES=${OBJS} |
55 | FILESDIR=${LIBDIR} | | 55 | FILESDIR=${LIBDIR} |
56 | CLEANFILES=${OBJS} | | 56 | CLEANFILES=${OBJS} |
57 | | | 57 | |
58 | .include <bsd.prog.mk> | | 58 | .include <bsd.prog.mk> |