summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2013-12-28 11:00:33 +0000
committerjsing <jsing@openbsd.org>2013-12-28 11:00:33 +0000
commitf6f845c64f82f760c18260c6b4f1300279f58e3f (patch)
tree46965144bc5202dd218ea80e1f385eac28665ed6
parentAttempt to approximate what should happen on a suspend/resume cycle. (diff)
downloadwireguard-openbsd-f6f845c64f82f760c18260c6b4f1300279f58e3f.tar.xz
wireguard-openbsd-f6f845c64f82f760c18260c6b4f1300279f58e3f.zip
Tweak makefiles so that we pull in source files based on defines.
-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