summaryrefslogtreecommitdiff
path: root/sys/arch/aviion/conf
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/aviion/conf')
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
index 0b5d1280aea..6b41a389097 100644
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ b/sys/arch/aviion/conf/Makefile.aviion
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.aviion,v 1.8 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.aviion,v 1.9 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD
#
@@ -52,6 +52,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -Ttext 0x1000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS?= ${CFLAGS}
@@ -128,7 +134,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} ${PARAM} -UKGDB \
@@ -150,7 +156,7 @@ links:
SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -161,6 +167,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