generate options.h like we do for gcc4/backend. so far only seems to

be strictly necessary for powerpc so allow the old MI defs.mk to be
used if a MD one does not exist.  when all platforms are regenerated
this support can be removed along with libobjc4/defs.mk.
This commit is contained in:
mrg 2006-05-23 10:59:03 +00:00
parent 445a28d54e
commit 5eebeb71e5
2 changed files with 31 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2006/05/15 04:57:05 christos Exp $
# $NetBSD: Makefile,v 1.4 2006/05/23 10:59:03 mrg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@ -12,8 +12,16 @@ LIB= objc
SHLIB_MAJOR= 2
SHLIB_MINOR= 1
# 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
# Machine-independent definitions (include file names).
.include "${.CURDIR}/defs.mk"
EXTRA_FAKEHEADERS= options.h
.endif
LIBGCCOBJ!= cd ${.CURDIR}/../libgcc4/libgcc && ${PRINTOBJDIR}
@ -59,7 +67,7 @@ runtime-info.h:
${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
# these aren't necessary but are #include'd
FAKEHEADERS=options.h insn-flags.h insn-constants.h
FAKEHEADERS= ${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h
${FAKEHEADERS}:
${_MKTARGET_CREATE}
touch ${.TARGET}
@ -73,6 +81,17 @@ unwind.h: ${G_UNWIND_H}
ln -s ${G_UNWIND_H} ${.TARGET}
CLEANFILES+= unwind.h
# XXX just while all platforms defs.mk are updated..
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
CLEANFILES+= options.h optionlist
optionlist: ${G_ALL_OPT_FILES) Makefile ${DIST}/gcc/opt-gather.awk
${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}
.endif
.else
.include <bsd.prog.mk> # do nothing
.endif

View File

@ -0,0 +1,10 @@
# This file is automatically generated. DO NOT EDIT!
# Generated from: NetBSD: mknative-gcc,v 1.17 2006/05/15 22:03:03 mrg Exp
# and from: NetBSD: mknative.common,v 1.7 2006/05/17 03:27:19 mrg Exp
#
G_ALL_OPT_FILES=${GNUHOSTDIST}/gcc/c.opt ${GNUHOSTDIST}/gcc/common.opt ${GNUHOSTDIST}/gcc/config/rs6000/rs6000.opt ${GNUHOSTDIST}/gcc/config/rs6000/sysv4.opt
G_ALL_CFLAGS=-I. -I${GNUHOSTDIST}/libobjc -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
G_INCLUDES=-I${GNUHOSTDIST}/libobjc/objc -I${GNUHOSTDIST}/libobjc/../gcc -I${GNUHOSTDIST}/libobjc/../gcc/config -I../.././gcc -I${GNUHOSTDIST}/libobjc/../include
G_OBJS=archive.lo class.lo encoding.lo gc.lo hash.lo init.lo linking.lo misc.lo nil_method.lo NXConstStr.lo Object.lo objects.lo Protocol.lo sarray.lo selector.lo sendmsg.lo thr.lo thr-objc.lo exception.lo hash_compat.lo
G_OBJC_H=hash.h objc-list.h sarray.h objc.h objc-api.h NXConstStr.h Object.h Protocol.h encoding.h typedstream.h thr.h objc-decls.h
G_UNWIND_H=${GNUHOSTDIST}/gcc/unwind-generic.h