summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2013-12-28 11:00:34 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2013-12-28 11:00:34 +0000
commit785929c8c5482356fc4fc3f561adc40c14db35f9 (patch)
treeda160cf811ddead852d99090a1be575d7fa9384c /usr.sbin
parent9c6aa0a228cad7dffc11b01d8d4eb3e31e42fa3b (diff)
Tweak makefiles so that we pull in source files based on defines.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/installboot/Makefile10
-rw-r--r--usr.sbin/installboot/amd64/Makefile.inc6
-rw-r--r--usr.sbin/installboot/hppa/Makefile.inc5
-rw-r--r--usr.sbin/installboot/i386/Makefile.inc4
4 files changed, 13 insertions, 12 deletions
diff --git a/usr.sbin/installboot/Makefile b/usr.sbin/installboot/Makefile
index 9fe913c2889..958133f3207 100644
--- a/usr.sbin/installboot/Makefile
+++ b/usr.sbin/installboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2013/12/27 14:23:49 jsing Exp $
+# $OpenBSD: Makefile,v 1.4 2013/12/28 11:00:33 jsing Exp $
NOMAN=
@@ -16,6 +16,14 @@ SRCS += installboot.c
.include "${.CURDIR}/${MACHINE}/Makefile.inc"
+.if !empty(CFLAGS:M-DBOOTSTRAP)
+SRCS += bootstrap.c
+.endif
+
+.if !empty(CFLAGS:M-DSOFTRAID)
+SRCS += softraid.c
+.endif
+
.else
NOPROG=
.endif
diff --git a/usr.sbin/installboot/amd64/Makefile.inc b/usr.sbin/installboot/amd64/Makefile.inc
index d986984b198..a2e7c8a0d75 100644
--- a/usr.sbin/installboot/amd64/Makefile.inc
+++ b/usr.sbin/installboot/amd64/Makefile.inc
@@ -1,12 +1,8 @@
-# $OpenBSD: Makefile.inc,v 1.2 2013/12/27 15:02:49 jsing Exp $
+# $OpenBSD: Makefile.inc,v 1.3 2013/12/28 11:00:33 jsing Exp $
CPPFLAGS += -I${.CURDIR}/amd64
-
-CFLAGS += -DNLIST
CFLAGS += -DSOFTRAID
-SRCS += softraid.c
-
.PATH: ${.CURDIR}/i386
SRCS += i386_installboot.c
SRCS += i386_nlist.c
diff --git a/usr.sbin/installboot/hppa/Makefile.inc b/usr.sbin/installboot/hppa/Makefile.inc
index 1aa1c9c9251..b5c651dec6b 100644
--- a/usr.sbin/installboot/hppa/Makefile.inc
+++ b/usr.sbin/installboot/hppa/Makefile.inc
@@ -1,8 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.1 2013/12/27 14:23:49 jsing Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2013/12/28 11:00:33 jsing Exp $
CPPFLAGS += -I${.CURDIR}/hppa
-
-SRCS += bootstrap.c
+CFLAGS += -DBOOTSTRAP
.PATH: ${.CURDIR}/hppa
SRCS += hppa_installboot.c
diff --git a/usr.sbin/installboot/i386/Makefile.inc b/usr.sbin/installboot/i386/Makefile.inc
index 11c878a74b7..7aa4eb07213 100644
--- a/usr.sbin/installboot/i386/Makefile.inc
+++ b/usr.sbin/installboot/i386/Makefile.inc
@@ -1,10 +1,8 @@
-# $OpenBSD: Makefile.inc,v 1.2 2013/12/27 15:02:49 jsing Exp $
+# $OpenBSD: Makefile.inc,v 1.3 2013/12/28 11:00:33 jsing Exp $
CPPFLAGS += -I${.CURDIR}/i386
CFLAGS += -DSOFTRAID
-SRCS += softraid.c
-
.PATH: ${.CURDIR}/i386
SRCS += i386_installboot.c
SRCS += i386_nlist.c