blob: c7161f8792b2dc9312df1b600eee8d4adb571482 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#
3# Makefile for building the SELinux module as part of the kernel tree.
4#
5
Paul Gortmaker60272da2010-09-15 20:14:53 -04006obj-$(CONFIG_SECURITY_SELINUX) := selinux.o
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Paul Gortmaker60272da2010-09-15 20:14:53 -04008selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \
Daniel Jurgens409dcf32017-05-19 15:48:59 +03009 netnode.o netport.o ibpkey.o exports.o \
Paul Gortmaker60272da2010-09-15 20:14:53 -040010 ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \
11 ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Trent Jaegerd28d1e02005-12-13 23:12:40 -080013selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
14
Paul Moore5778eab2007-02-28 15:14:22 -050015selinux-$(CONFIG_NETLABEL) += netlabel.o
16
Andy Shevchenko9090a2d2016-01-28 14:59:16 +020017ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Paul Gortmakerceba72a2010-08-09 17:34:25 -040019$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
Stephen Smalley8753f6b2009-09-30 13:41:02 -040020
21quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
22 cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
23
Ralf Baechlea7a387c2010-08-06 20:37:56 +010024targets += flask.h av_permissions.h
Stephen Smalley8753f6b2009-09-30 13:41:02 -040025$(obj)/flask.h: $(src)/include/classmap.h FORCE
26 $(call if_changed,flask)