2006-11-09 23:07:14 +03:00
|
|
|
# $NetBSD: Makefile,v 1.9 2006/11/09 20:07:15 christos Exp $
|
2006-05-11 02:53:49 +04:00
|
|
|
|
|
|
|
REQUIRETOOLS= yes
|
|
|
|
NOLINT= # defined
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
LIB= objc
|
|
|
|
|
|
|
|
.if ${MKGCC} != "no"
|
|
|
|
|
|
|
|
SHLIB_MAJOR= 2
|
2006-05-12 03:52:41 +04:00
|
|
|
SHLIB_MINOR= 1
|
2006-05-11 02:53:49 +04:00
|
|
|
|
2006-05-23 14:59:03 +04:00
|
|
|
# XXX just while all platforms defs.mk are updated..
|
|
|
|
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
|
|
|
|
# Machine-dependent definitions (include file names).
|
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
|
|
|
|
EXTRA_FAKEHEADERS=
|
|
|
|
.else
|
2006-05-11 02:53:49 +04:00
|
|
|
# Machine-independent definitions (include file names).
|
|
|
|
.include "${.CURDIR}/defs.mk"
|
2006-05-23 14:59:03 +04:00
|
|
|
EXTRA_FAKEHEADERS= options.h
|
|
|
|
.endif
|
2006-05-11 02:53:49 +04:00
|
|
|
|
|
|
|
LIBGCCOBJ!= cd ${.CURDIR}/../libgcc4/libgcc && ${PRINTOBJDIR}
|
|
|
|
|
|
|
|
DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4
|
|
|
|
GNUHOSTDIST= ${NETBSDSRCDIR}/gnu/dist/gcc4
|
|
|
|
GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH}
|
2006-06-23 21:27:08 +04:00
|
|
|
LIBOBJCARCH= ${NETBSDSRCDIR}/gnu/lib/libobjc4/arch/${MACHINE_ARCH}
|
2006-05-11 02:53:49 +04:00
|
|
|
GCCLIBXX= ${NETBSDSRCDIR}/gnu/lib/libstdc++-v3_4/arch/${MACHINE_ARCH}
|
|
|
|
|
|
|
|
SRCS= ${G_OBJS:N[A-Z]*:Nlinking.lo:.lo=.c} ${G_OBJS:M[A-Z]*:.lo=.m} linking.m
|
|
|
|
|
|
|
|
GCPPFLAGS= ${G_ALL_CFLAGS} ${G_INCLUDES}
|
2006-06-04 02:40:38 +04:00
|
|
|
CPPFLAGS+= -I. -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
|
2006-05-11 02:53:49 +04:00
|
|
|
CPPFLAGS+= -I${GCCLIBXX}
|
|
|
|
|
|
|
|
BUILDSYMLINKS= ${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH} bits
|
|
|
|
DPSRCS+= bits
|
|
|
|
|
|
|
|
.for f in Protocol.m Object.m NXConstStr.m linking.m
|
2006-05-15 08:57:05 +04:00
|
|
|
OBJCOPTS.${f}= -fgnu-runtime
|
2006-05-11 02:53:49 +04:00
|
|
|
.endfor
|
2006-05-12 03:52:41 +04:00
|
|
|
|
|
|
|
.for f in thr.c thr-objc.c
|
|
|
|
COPTS.${f}= -Wno-missing-noreturn
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
COPTS+= -fno-strict-aliasing -fexceptions
|
|
|
|
OBJCOPTS+= -fno-strict-aliasing -fexceptions
|
2006-05-11 02:53:49 +04:00
|
|
|
|
2006-11-09 23:07:14 +03:00
|
|
|
OBJCOPTS.Object.m = -Wno-stack-protector
|
|
|
|
COPTS.sendmsg.c = -Wno-stack-protector
|
|
|
|
|
2006-05-11 02:53:49 +04:00
|
|
|
INCS= ${G_OBJC_H}
|
|
|
|
INCSDIR= /usr/include/objc
|
|
|
|
|
|
|
|
DPSRCS+= runtime-info.h
|
|
|
|
CLEANFILES+= rtscratch rtscratch.s runtime-info.h
|
|
|
|
runtime-info.h:
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
touch rtscratch
|
|
|
|
`${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch >$@
|
|
|
|
|
|
|
|
.PATH: ${DIST}/libobjc ${DIST}/libobjc/objc
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
|
|
|
${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
|
|
|
|
|
|
|
|
# these aren't necessary but are #include'd
|
2006-05-23 14:59:03 +04:00
|
|
|
FAKEHEADERS= ${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h
|
2006-05-11 02:53:49 +04:00
|
|
|
${FAKEHEADERS}:
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
touch ${.TARGET}
|
|
|
|
tm.h ${SRCS}: ${FAKEHEADERS}
|
|
|
|
CLEANFILES+= ${FAKEHEADERS}
|
|
|
|
|
2006-06-04 02:40:38 +04:00
|
|
|
${SRCS}: tconfig.h unwind.h options.h
|
|
|
|
|
|
|
|
tconfig.h:
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
TARGET_CPU_DEFAULT="" \
|
|
|
|
HEADERS="$(G_xm_include_list)" DEFINES="USED_FOR_TARGET $(G_xm_defines)" \
|
|
|
|
${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
|
|
|
|
2006-05-11 02:53:49 +04:00
|
|
|
unwind.h: ${G_UNWIND_H}
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
rm -f ${.TARGET}
|
|
|
|
ln -s ${G_UNWIND_H} ${.TARGET}
|
2006-06-04 02:40:38 +04:00
|
|
|
|
2006-07-04 22:26:18 +04:00
|
|
|
CLEANFILES+= cs-tconfig.h tconfig.h unwind.h
|
2006-05-11 02:53:49 +04:00
|
|
|
|
2006-05-23 14:59:03 +04:00
|
|
|
# XXX just while all platforms defs.mk are updated..
|
|
|
|
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
|
2006-06-23 21:27:08 +04:00
|
|
|
optionlist: ${G_ALL_OPT_FILES} ${LIBOBJCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk
|
2006-05-23 14:59:03 +04:00
|
|
|
${AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} > ${.TARGET}
|
|
|
|
|
|
|
|
options.h: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/opth-gen.awk
|
|
|
|
${AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/opth-gen.awk \
|
|
|
|
< optionlist > ${.TARGET}
|
2006-06-04 02:40:38 +04:00
|
|
|
|
|
|
|
CLEANFILES+= options.h optionlist
|
2006-05-23 14:59:03 +04:00
|
|
|
.endif
|
|
|
|
|
2006-05-11 02:53:49 +04:00
|
|
|
.else
|
|
|
|
.include <bsd.prog.mk> # do nothing
|
|
|
|
.endif
|