Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | # |
| 3 | # Makefile for building the SELinux module as part of the kernel tree. |
| 4 | # |
| 5 | |
Paul Gortmaker | 60272da | 2010-09-15 20:14:53 -0400 | [diff] [blame] | 6 | obj-$(CONFIG_SECURITY_SELINUX) := selinux.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Paul Gortmaker | 60272da | 2010-09-15 20:14:53 -0400 | [diff] [blame] | 8 | selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \ |
Daniel Jurgens | 409dcf3 | 2017-05-19 15:48:59 +0300 | [diff] [blame] | 9 | netnode.o netport.o ibpkey.o exports.o \ |
Paul Gortmaker | 60272da | 2010-09-15 20:14:53 -0400 | [diff] [blame] | 10 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | |
Trent Jaeger | d28d1e0 | 2005-12-13 23:12:40 -0800 | [diff] [blame] | 13 | selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o |
| 14 | |
Paul Moore | 5778eab | 2007-02-28 15:14:22 -0500 | [diff] [blame] | 15 | selinux-$(CONFIG_NETLABEL) += netlabel.o |
| 16 | |
Andy Shevchenko | 9090a2d | 2016-01-28 14:59:16 +0200 | [diff] [blame] | 17 | ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
Paul Gortmaker | ceba72a | 2010-08-09 17:34:25 -0400 | [diff] [blame] | 19 | $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h |
Stephen Smalley | 8753f6b | 2009-09-30 13:41:02 -0400 | [diff] [blame] | 20 | |
| 21 | quiet_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 Baechle | a7a387c | 2010-08-06 20:37:56 +0100 | [diff] [blame] | 24 | targets += flask.h av_permissions.h |
Stephen Smalley | 8753f6b | 2009-09-30 13:41:02 -0400 | [diff] [blame] | 25 | $(obj)/flask.h: $(src)/include/classmap.h FORCE |
| 26 | $(call if_changed,flask) |