summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-01-01 17:17:45 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-01-01 17:17:45 +0000
commit246e62282b1efbb28be85d6c5a9c54cef747c7d8 (patch)
tree7004e1caa9128276b43d2017d7f98d21b7b919f6 /sys/arch
parent287084f1ca7f0e00e161b8eed9a31a8e19c145fb (diff)
Define _STANDALONE, not STANDALONE, in the hp300 bootblocks, to follow the
common (and expected) practice. This exposes a flaw, in that mkboot, a host tool, gets built with boot block settings (and won't compile if _STANDALONE is defined). Fix this by using different set of CPPFLAGS for host tools and boot blocks. While there, avoid sourcing ../Makefile.inc twice.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/dev/sti_machdep.h4
-rw-r--r--sys/arch/hp300/stand/Makefile.inc12
-rw-r--r--sys/arch/hp300/stand/cdboot/Makefile4
-rw-r--r--sys/arch/hp300/stand/common/Makefile4
-rw-r--r--sys/arch/hp300/stand/libsa/Makefile4
-rw-r--r--sys/arch/hp300/stand/libz/Makefile6
-rw-r--r--sys/arch/hp300/stand/mkboot/Makefile5
-rw-r--r--sys/arch/hp300/stand/uboot/Makefile4
8 files changed, 22 insertions, 21 deletions
diff --git a/sys/arch/hp300/dev/sti_machdep.h b/sys/arch/hp300/dev/sti_machdep.h
index d1acf1e5df7..c30770fe7cf 100644
--- a/sys/arch/hp300/dev/sti_machdep.h
+++ b/sys/arch/hp300/dev/sti_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti_machdep.h,v 1.1 2011/08/18 20:02:57 miod Exp $ */
+/* $OpenBSD: sti_machdep.h,v 1.2 2013/01/01 17:17:44 miod Exp $ */
/*
* Copyright (c) 2005, 2011, Miodrag Vallat
@@ -26,7 +26,7 @@
*
*/
-#ifndef STANDALONE
+#ifndef _STANDALONE
/* Console data */
extern struct sti_rom sticn_rom;
extern struct sti_screen sticn_scr;
diff --git a/sys/arch/hp300/stand/Makefile.inc b/sys/arch/hp300/stand/Makefile.inc
index 72a997874e5..693493bfdaf 100644
--- a/sys/arch/hp300/stand/Makefile.inc
+++ b/sys/arch/hp300/stand/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.11 2011/08/18 20:02:58 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.12 2013/01/01 17:17:44 miod Exp $
# $NetBSD: Makefile.inc,v 1.7 1997/05/12 07:43:18 thorpej Exp $
BINDIR= /usr/mdec
@@ -9,13 +9,13 @@ RELOC= FFF00000
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes \
-fno-stack-protector -msoft-float
-CPPFLAGS+= -DAPCICONSOLE -DDCACONSOLE -DDCMCONSOLE -DITECONSOLE
-CPPFLAGS+= -DHIL_KEYBOARD -DDOMAIN_KEYBOARD
-CPPFLAGS+= -DSTANDALONE -D__hp300__
-CPPFLAGS+= -DCOMPAT_UFS -DNO_LSEEK
+SA_CPPFLAGS+= -DAPCICONSOLE -DDCACONSOLE -DDCMCONSOLE -DITECONSOLE
+SA_CPPFLAGS+= -DHIL_KEYBOARD -DDOMAIN_KEYBOARD
+SA_CPPFLAGS+= -D_STANDALONE -D__hp300__
+SA_CPPFLAGS+= -DCOMPAT_UFS -DNO_LSEEK
# Limit the alloc() heap to below the msgbuf and ROM scratch pages.
-CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff"
+SA_CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff"
### Figure out what to use for libcommon
COMMONDIR= ${.CURDIR}/../common
diff --git a/sys/arch/hp300/stand/cdboot/Makefile b/sys/arch/hp300/stand/cdboot/Makefile
index c6fb3b859d5..c739e230569 100644
--- a/sys/arch/hp300/stand/cdboot/Makefile
+++ b/sys/arch/hp300/stand/cdboot/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:18 pascal Exp $
+# $OpenBSD: Makefile,v 1.7 2013/01/01 17:17:44 miod Exp $
PROG= cdboot
NOMAN=
NOPIE=
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+= ${SA_CPPFLAGS}
.PATH: ${.CURDIR}/../uboot
diff --git a/sys/arch/hp300/stand/common/Makefile b/sys/arch/hp300/stand/common/Makefile
index 37d607248c8..2ff68c674c0 100644
--- a/sys/arch/hp300/stand/common/Makefile
+++ b/sys/arch/hp300/stand/common/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.6 2006/08/17 06:31:10 miod Exp $
+# $OpenBSD: Makefile,v 1.7 2013/01/01 17:17:44 miod Exp $
LIB= common
NOMAN= noman
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+= ${SA_CPPFLAGS}
SRCS= apci.c autoconf.c cons.c ct.c dca.c dcm.c dnkbd.c \
fhpib.c hd.c hil.c hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_hy.c \
diff --git a/sys/arch/hp300/stand/libsa/Makefile b/sys/arch/hp300/stand/libsa/Makefile
index 1ad0f89858b..d6049d666e2 100644
--- a/sys/arch/hp300/stand/libsa/Makefile
+++ b/sys/arch/hp300/stand/libsa/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.15 2007/12/28 18:56:08 miod Exp $
+# $OpenBSD: Makefile,v 1.16 2013/01/01 17:17:44 miod Exp $
LIB= sa
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+= ${SA_CPPFLAGS}
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../include -I${.CURDIR}/../.. \
-I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \
diff --git a/sys/arch/hp300/stand/libz/Makefile b/sys/arch/hp300/stand/libz/Makefile
index fae4e85ef58..8e1a2abd4c9 100644
--- a/sys/arch/hp300/stand/libz/Makefile
+++ b/sys/arch/hp300/stand/libz/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 2012/08/21 14:46:18 pascal Exp $
+# $OpenBSD: Makefile,v 1.6 2013/01/01 17:17:44 miod Exp $
S=${.CURDIR}/../../../..
ZDST=${.OBJDIR}
@@ -7,6 +7,8 @@ NOPIE=
.PATH: ${S}/lib/libz
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+= ${SA_CPPFLAGS}
+
+CFLAGS+=-I${S}
.include "${S}/lib/libz/Makefile"
diff --git a/sys/arch/hp300/stand/mkboot/Makefile b/sys/arch/hp300/stand/mkboot/Makefile
index 8a4fa0470e5..c0f16a9a46b 100644
--- a/sys/arch/hp300/stand/mkboot/Makefile
+++ b/sys/arch/hp300/stand/mkboot/Makefile
@@ -1,13 +1,12 @@
-# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $
+# $OpenBSD: Makefile,v 1.4 2013/01/01 17:17:44 miod Exp $
# $NetBSD: Makefile,v 1.2 1997/05/14 07:57:13 thorpej Exp $
PROG= mkboot
NOMAN=
NOPIE=
-.include "${.CURDIR}/../Makefile.inc"
-
CFLAGS+= -I${.CURDIR}/../include
+CPPFLAGS=
install:
diff --git a/sys/arch/hp300/stand/uboot/Makefile b/sys/arch/hp300/stand/uboot/Makefile
index d3ea9a59aca..b10846645a0 100644
--- a/sys/arch/hp300/stand/uboot/Makefile
+++ b/sys/arch/hp300/stand/uboot/Makefile
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:18 pascal Exp $
+# $OpenBSD: Makefile,v 1.8 2013/01/01 17:17:44 miod Exp $
PROG= uboot
NOMAN=
NOPIE=
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+= ${SA_CPPFLAGS}
CFLAGS+=-I${.CURDIR}/../include \
-I${.CURDIR}/../libsa -I${.CURDIR}/../.. -I${.CURDIR}/../../.. \