1OPT_SUBDIRS ?= dbus gui mcstrans python restorecond sandbox semodule-utils 2SUBDIRS=libsepol libselinux libsemanage checkpolicy secilc policycoreutils $(OPT_SUBDIRS) 3PYSUBDIRS=libselinux libsemanage 4DISTCLEANSUBDIRS=libselinux libsemanage 5 6ifeq ($(DEBUG),1) 7 export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror 8 export LDFLAGS = -g 9endif 10 11ifneq ($(DESTDIR),) 12 CFLAGS += -I$(DESTDIR)/usr/include 13 LDFLAGS += -L$(DESTDIR)/usr/lib 14 export CFLAGS 15 export LDFLAGS 16endif 17 18all install relabel clean test indent: 19 @for subdir in $(SUBDIRS); do \ 20 (cd $$subdir && $(MAKE) $@) || exit 1; \ 21 done 22 23install-pywrap install-rubywrap swigify: 24 @for subdir in $(PYSUBDIRS); do \ 25 (cd $$subdir && $(MAKE) $@) || exit 1; \ 26 done 27 28distclean: 29 @for subdir in $(DISTCLEANSUBDIRS); do \ 30 (cd $$subdir && $(MAKE) $@) || exit 1; \ 31 done 32