From 9e88d73aaaba93d716ecd49767dfcdf3ffdbff30 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 31 Aug 2012 09:22:12 -0500 Subject: add MKPREFIX flag to build system This allows building OpenRC for a Gentoo Prefix installation. --- README | 3 +++ mk/os-prefix.mk | 6 ++++++ mk/os.mk | 1 + 3 files changed, 10 insertions(+) create mode 100644 mk/os-prefix.mk diff --git a/README b/README index 8244b04..2740f54 100644 --- a/README +++ b/README @@ -12,6 +12,7 @@ LIBNAME=lib64 DESTDIR=/tmp/openrc-image MKNET=oldnet MKPAM=pam +MKPREFIX=yes MKPKGCONFIG=no MKSELINUX=yes MKSTATICLIBS=no @@ -25,6 +26,8 @@ We don't support building a static OpenRC with PAM. You may need to use PROGLDFLAGS=-Wl,-Bstatic on glibc instead of just -static. If you debug memory under valgrind, add -DDEBUG_MEMORY to your CPPFLAGS so that all malloc memory should be freed at exit. +If you are building OpenRC for a Gentoo Prefix installation, add +MKPREFIX=yes. You can also brand OpenRC if you so wish like so BRANDING=\"Gentoo/$(uname -s)\" diff --git a/mk/os-prefix.mk b/mk/os-prefix.mk new file mode 100644 index 0000000..94fda96 --- /dev/null +++ b/mk/os-prefix.mk @@ -0,0 +1,6 @@ +# Copyright (c) 2012 William Hubbs +# Released under the 2-clause BSD license. + +ifeq (${MKPREFIX},yes} +CPPFLAGS+= -DPREFIX +endif diff --git a/mk/os.mk b/mk/os.mk index c306f05..3e18962 100644 --- a/mk/os.mk +++ b/mk/os.mk @@ -7,5 +7,6 @@ _OS_SH= uname -s _OS:= $(shell ${_OS_SH}) OS?= ${_OS} include ${MK}/os-${OS}.mk +include ${MK}/os-prefix.mk RC_LIB= /$(LIBNAME)/rc -- cgit v1.2.3