Makefile 998 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Makefile for building the SELinux module as part of the kernel tree.
  3. #
  4. ifeq ($(SEC_BUILD_OPTION_PRODUCT_SHIP), true)
  5. ifeq ($(SEC_BUILD_OPTION_SELINUX_ENFORCE),true)
  6. EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true
  7. endif
  8. endif
  9. obj-$(CONFIG_SECURITY_SELINUX) := selinux.o
  10. selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \
  11. netnode.o netport.o exports.o \
  12. ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \
  13. ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o
  14. selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
  15. selinux-$(CONFIG_NETLABEL) += netlabel.o
  16. ccflags-y := -Isecurity/selinux -Isecurity/selinux/include
  17. $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
  18. quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
  19. cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
  20. targets += flask.h av_permissions.h
  21. $(obj)/flask.h: $(src)/include/classmap.h FORCE
  22. $(call if_changed,flask)