From: jsing Date: Sat, 28 Dec 2013 11:00:33 +0000 (+0000) Subject: Tweak makefiles so that we pull in source files based on defines. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f6f845c64f82f760c18260c6b4f1300279f58e3f;p=openbsd Tweak makefiles so that we pull in source files based on defines. --- 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