diff options
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/conf/Makefile.i386 | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index abfc61545cc..25a5609b156 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.52 2009/07/10 13:51:47 jsg Exp $ +# $OpenBSD: Makefile.i386,v 1.53 2009/08/09 23:04:49 miod Exp $ # Makefile for OpenBSD # @@ -56,6 +56,12 @@ AFLAGS+=-m32 LINKFLAGS+=-melf_i386_obsd .endif +.if ${IDENT:M-DDDB_STRUCT} +DB_STRUCTINFO= db_structinfo.h +.else +DB_STRUCTINFO= +.endif + HOSTCC= ${CC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} @@ -133,7 +139,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} clean:: rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \ - [Ee]rrs linterrs makelinks assym.h + [Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO} lint: @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \ @@ -154,7 +160,7 @@ links: SRCS= ${I386}/i386/locore.s \ param.c ioconf.c ${CFILES} ${SFILES} depend:: .depend -.depend: ${SRCS} assym.h param.c ${APMINC} +.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO} ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${I386}/i386/locore.s ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES} @@ -164,6 +170,11 @@ depend:: .depend < assym.dep >> .depend @rm -f assym.dep +db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk + ${CC} ${CFLAGS} ${CPPFLAGS} -gstabs -c $S/ddb/db_structinfo.c + objdump -g db_structinfo.o | awk -f $S/ddb/parse_structinfo.awk > $@ + rm -f db_structinfo.o + # depend on root or device configuration autoconf.o conf.o: Makefile |