Make it easy to omit optional components.

Split optional components into their own overridable OPT_SUBDIRS
definition.  Then you can build without them via make OPT_SUBDIRS=
or specify a subset of them in that manner.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
Stephen Smalley 2016-10-31 13:41:12 -04:00
parent c9c97d6e8b
commit 3dcdc46378

View File

@ -1,13 +1,8 @@
SUBDIRS=libsepol libselinux libsemanage checkpolicy secilc policycoreutils gui sandbox dbus python semodule-utils
OPT_SUBDIRS ?= dbus gui python restorecond sandbox semodule-utils
SUBDIRS=libsepol libselinux libsemanage checkpolicy secilc policycoreutils $(OPT_SUBDIRS)
PYSUBDIRS=libselinux libsemanage
DISTCLEANSUBDIRS=libselinux libsemanage
INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)
SUBDIRS += restorecond
endif
ifeq ($(DEBUG),1)
export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
export LDFLAGS = -g