selinux/Makefile
Jason Zaman 9a7763e186 Add includes for DESTDIR only in root Makefile
Signed-off-by: Jason Zaman <jason@perfinion.com>
2017-04-25 08:31:10 -04:00

32 lines
841 B
Makefile

OPT_SUBDIRS ?= dbus gui mcstrans python restorecond sandbox semodule-utils
SUBDIRS=libsepol libselinux libsemanage checkpolicy secilc policycoreutils $(OPT_SUBDIRS)
PYSUBDIRS=libselinux libsemanage
DISTCLEANSUBDIRS=libselinux libsemanage
ifeq ($(DEBUG),1)
export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
export LDFLAGS = -g
endif
ifneq ($(DESTDIR),)
CFLAGS += -I$(DESTDIR)/usr/include
LDFLAGS += -L$(DESTDIR)/usr/lib
export CFLAGS
export LDFLAGS
endif
all install relabel clean test indent:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
install-pywrap install-rubywrap swigify:
@for subdir in $(PYSUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
distclean:
@for subdir in $(DISTCLEANSUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done