summaryrefslogtreecommitdiff
path: root/sys/arch/socppc/conf
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/socppc/conf')
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index 0d5b92fc285..b13f33fb9be 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.3 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.socppc,v 1.4 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD PowerPC
#
@@ -51,6 +51,12 @@ AFLAGS= -D_LOCORE -Wa,-many
LINKFLAGS= -N -Ttext 200000 -e start --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -126,7 +132,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 -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
@@ -147,7 +153,7 @@ links:
SRCS= ${SOCPPC}/socppc/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SOCPPC}/socppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -159,6 +165,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