summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64/conf/Makefile.hppa64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa64/conf/Makefile.hppa64')
-rw-r--r--sys/arch/hppa64/conf/Makefile.hppa6417
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64
index 8b764075ebc..29894d638e5 100644
--- a/sys/arch/hppa64/conf/Makefile.hppa64
+++ b/sys/arch/hppa64/conf/Makefile.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa64,v 1.9 2009/08/09 21:33:38 miod Exp $
+# $OpenBSD: Makefile.hppa64,v 1.10 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -51,6 +51,12 @@ STRIPFLAGS= -g -x
CFLAGS+= -fno-omit-frame-pointer
.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}
@@ -124,7 +130,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 \
@@ -144,7 +150,7 @@ links:
SRCS= ${HPPA}/hppa64/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa64/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
@@ -156,6 +162,11 @@ SRCS= ${HPPA}/hppa64/locore.S \
< 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