Author: metze Date: 2005-08-02 19:34:41 +0000 (Tue, 02 Aug 2005) New Revision: 391
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=391 Log: make build outside the kernel tree possible metze Modified: trunk/ntacl-lsm/Makefile Changeset: Modified: trunk/ntacl-lsm/Makefile =================================================================== --- trunk/ntacl-lsm/Makefile 2005-08-02 06:16:42 UTC (rev 390) +++ trunk/ntacl-lsm/Makefile 2005-08-02 19:34:41 UTC (rev 391) @@ -1,8 +1,54 @@ # # Makefile for building the NT ACL module as part of the kernel tree. # +# Original makefile by Stefan Metzmacher +# +# NOTE: This make file can serve as both an external Makefile (launched +# directly by the user), or as the sub-dir Makefile used by the kernel +# build system. +# If CONFIG_SECURITY_NTACL isn't set, we'll assume the user has never configured +# their kernel to include this module and set up some defaults. +# +ifndef CONFIG_SECURITY_NTACL +EXTERNAL_BUILD=y +CONFIG_SECURITY_NTACL=m +endif + +list-m := +list-$(CONFIG_SECURITY_NTACL) += ntacl + +obj-m := obj-$(CONFIG_SECURITY_NTACL) += ntacl.o - ntacl-objs := main.o talloc.o ndr.o ndr_xattr_pull.o ndr_security_pull.o \ ndr_misc_pull.o access_check.o + +# Here we begin the portion that is executed if the user invoked this Makefile +# directly. + +KERNEL_SOURCE ?= /lib/modules/$(shell uname -r)/build + +all: modules + +modules modules_install clean: + $(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=$(shell pwd) $@ + +install: modules_install + + + + +.PHONY: TAGS tags + +RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o +define all-sources + ( find . $(RCS_FIND_IGNORE) -name '*.[chS]' -print ) +endef + +TAGS: + $(all-sources) | etags - +tags: + rm -f $@ + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ + $(all-sources) | xargs ctags $$CTAGSF -a +
