f14fb60209
* Updating common/lib * Updating lib/csu * Updating lib/libc * Updating libexec/ld.elf_so * Corrected test on __minix in featuretest to actually follow the meaning of the comment. * Cleaned up _REENTRANT-related defintions. * Disabled -D_REENTRANT for libfetch * Removing some unneeded __NBSD_LIBC defines and tests Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
74 lines
1.6 KiB
Makefile
74 lines
1.6 KiB
Makefile
# $NetBSD: Makefile.inc,v 1.35 2012/08/04 14:59:05 matt Exp $
|
|
|
|
.if !defined(ELFSIZE)
|
|
ELFSIZE=32
|
|
.endif
|
|
|
|
.include "../../Makefile.inc"
|
|
|
|
CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=${ELFSIZE}
|
|
CPPFLAGS+= -I${NETBSDSRCDIR}/libexec/ld.elf_so
|
|
CPPFLAGS+= -I${.CURDIR}/../common_elf
|
|
CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libc/dlfcn
|
|
CPPFLAGS+= -DDWARF2_EH
|
|
CPPFLAGS+= -DJCR
|
|
CPPFLAGS+= -DDSO_HANDLE
|
|
|
|
.if defined(HAVE_GCC)
|
|
COPTS+= -fno-unit-at-a-time
|
|
.endif
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
.PATH: ${.CURDIR}/../common_elf
|
|
|
|
SRCS+= crt0.c crti.c crtn.c
|
|
OBJS+= crt0.o gcrt0.o crti.o crtn.o
|
|
.if ${MKPIC} != "no"
|
|
COPTS+= -fPIC
|
|
.endif
|
|
|
|
realall: ${OBJS}
|
|
|
|
crt0.o: crt0.c
|
|
${_MKTARGET_COMPILE}
|
|
${COMPILE.c} -DCRT0 ${.IMPSRC} -o ${.TARGET}.o
|
|
${LD} -x -r -o ${.TARGET} ${.TARGET}.o
|
|
rm -f ${.TARGET}.o
|
|
.if ${MKSTRIPIDENT} != "no"
|
|
${OBJCOPY} -R .ident ${.TARGET}
|
|
.endif
|
|
|
|
# dependent on crt0.o to pick up header dependencies
|
|
gcrt0.o: ${.CURDIR}/crt0.c crt0.o
|
|
${_MKTARGET_COMPILE}
|
|
${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
|
|
${LD} -x -r -o ${.TARGET} ${.TARGET}.o
|
|
rm -f ${.TARGET}.o
|
|
.if ${MKSTRIPIDENT} != "no"
|
|
${OBJCOPY} -R .ident ${.TARGET}
|
|
.endif
|
|
|
|
crti.o: crti.c
|
|
${_MKTARGET_COMPILE}
|
|
${COMPILE.c} -DCRTI ${.IMPSRC} -o ${.TARGET}.o
|
|
${LD} -X -r -o ${.TARGET} ${.TARGET}.o
|
|
rm -f ${.TARGET}.o
|
|
.if ${MKSTRIPIDENT} != "no"
|
|
${OBJCOPY} -R .ident ${.TARGET}
|
|
.endif
|
|
|
|
crtn.o: crtn.c
|
|
${_MKTARGET_COMPILE}
|
|
${COMPILE.c} -DCRTN ${.IMPSRC} -o ${.TARGET}.o
|
|
${LD} -X -r -o ${.TARGET} ${.TARGET}.o
|
|
rm -f ${.TARGET}.o
|
|
.if ${MKSTRIPIDENT} != "no"
|
|
${OBJCOPY} -R .ident ${.TARGET}
|
|
.endif
|
|
|
|
FILES=${OBJS}
|
|
FILESDIR=${LIBDIR}
|
|
CLEANFILES=${OBJS}
|
|
|
|
.include <bsd.prog.mk>
|