# netsniff-ng build system # Copyright 2012 - 2013 Daniel Borkmann # Copyright 2013 - 2015 Tobias Klauser # Subject to the GNU GPL, version 2. -include Config -include Cmds -include Extra -include Template -include Misc ifndef CONFIG_OK $(error "Please run `./configure' before `make'") endif VERSION = 0 PATCHLEVEL = 6 SUBLEVEL = 0 EXTRAVERSION = NAME = avril altdelay TOOLS ?= $(CONFIG_TOOLS) TOOLS ?= netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun mausezahn # For packaging purposes, prefix can define a different path. PREFIX ?= /usr/local # Set to use ccache for compilation CCACHE ?= # Location of an alternative destination directory for installation # Useful when cross-compiling and installing in a dedicated target directory DESTDIR= # Location of installation paths. SBINDIR = $(PREFIX)/sbin INCDIR = $(PREFIX)/include ETCDIR ?= /etc ETCDIRE = $(ETCDIR)/netsniff-ng MAN8DIR = $(PREFIX)/share/man/man8 # Shut up make, helper warnings, parallel compilation! MAKEFLAGS += --no-print-directory MAKEFLAGS += -rR MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --jobs=$(shell grep "^processor" /proc/cpuinfo | wc -l) # Debugging option ifeq ("$(origin DEBUG)", "command line") DEBUG := 1 else DEBUG := 0 endif # Compiler detection ifneq ($(CC),) ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) COMPILER := clang else COMPILER := gcc endif export COMPILER endif # For packaging purposes, you might want to call your own: # make CFLAGS="" CFLAGS_DEF = -std=gnu99 CFLAGS_DEF += -pipe CFLAGS_DEF += -O2 ifeq ($(DEBUG), 1) CFLAGS_DEF += -g endif ifeq ($(HARDENING), 1) CFLAGS_DEF += -fPIE -pie CFLAGS_DEF += -Wl,-z,relro,-z,now CFLAGS_DEF += -fstack-protector-all CFLAGS_DEF += -Wstack-protector CFLAGS_DEF += --param=ssp-buffer-size=4 CFLAGS_DEF += -ftrapv CFLAGS_DEF += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 CFLAGS_DEF += -fexceptions endif CFLAGS_DEF += -fomit-frame-pointer CFLAGS_DEF += -fno-strict-aliasing CFLAGS_DEF += -fasynchronous-unwind-tables ifneq ($(COMPILER), clang) CFLAGS_DEF += -fno-delete-null-pointer-checks endif CFLAGS_MIN = -D_REENTRANT CFLAGS_MIN += -D_LARGEFILE_SOURCE CFLAGS_MIN += -D_LARGEFILE64_SOURCE CFLAGS_MIN += -D_FILE_OFFSET_BITS=64 CFLAGS_MIN += -DVERSION_STRING=\"$(VERSION_STRING)\" CFLAGS_MIN += -DVERSION_LONG=\"$(VERSION_LONG)\" CFLAGS_MIN += -DETCDIRE_STRING=\"$(ETCDIRE)\" WFLAGS_DEF = -Wall CPPFLAGS ?= CFLAGS ?= $(CFLAGS_DEF) $(WFLAGS_DEF) $(CPPFLAGS) override CFLAGS += $(CFLAGS_MIN) -I. LEX_FLAGS = YAAC_FLAGS = LDFLAGS ?= ifeq ("$(origin CROSS_LD_LIBRARY_PATH)", "command line") LDFLAGS += -L$(CROSS_LD_LIBRARY_PATH) endif CHECKFLAGS = -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix \ -Wbitwise -Wnoreturn-void VERSION_SHORT = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) VERSION_STRING = "$(VERSION_SHORT)$(CONFIG_RC)" VERSION_LONG = "$(VERSION_SHORT)$(CONFIG_RC) ($(NAME))" export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION export DEBUG HARDENING ifneq ("$(TERM)", "") bold = $(shell tput bold) normal = $(shell tput sgr0) else bold = normal = endif ifneq ("$(CROSS_COMPILE)", "") WHAT := Cross-compiling else WHAT := Building endif build_showinfo: $(Q)echo "$(bold)$(WHAT) netsniff-ng toolkit ($(VERSION_STRING)) for" \ $(shell $(CCNQ) -dumpmachine)":$(normal)" clean_showinfo: $(Q)echo "$(bold)Cleaning netsniff-ng toolkit ($(VERSION_STRING)):$(normal)" .PHONY: all toolkit $(TOOLS) clean %_prehook %_clean %_install %_uninstall tag tags cscope .IGNORE: %_clean_custom %_install_custom .NOTPARALLEL: $(TOOLS) .DEFAULT_GOAL := all .DEFAULT: .FORCE: all: build_showinfo toolkit allbutcurvetun: $(filter-out curvetun,$(TOOLS)) allbutmausezahn: $(filter-out mausezahn,$(TOOLS)) toolkit: $(TOOLS) clean: $(foreach tool,$(TOOLS),$(tool)_clean) distclean: clean $(Q)$(call RM,Config) $(Q)$(call RM,config.h) $(Q)$(call RM,config.log) $(Q)$(call RM,cov-int) $(Q)$(call RM,netsniff-ng-coverity.tgz) mrproper: distclean $(Q)$(GIT_REM) install: install_all install_all: $(foreach tool,$(TOOLS),$(tool)_install) install_allbutcurvetun: $(foreach tool,$(filter-out curvetun,$(TOOLS)),$(tool)_install) install_allbutmausezahn: $(foreach tool,$(filter-out mausezahn,$(TOOLS)),$(tool)_install) uninstall: $(foreach tool,$(TOOLS),$(tool)_uninstall) %.yy.o: %.l $(LEX) -P $(shell perl -wlne 'print $$1 if /lex-func-prefix:\s([a-z]+)/' $<) \ -o $(BUILD_DIR)/$(shell basename $< .l).yy.c $(LEX_FLAGS) $< %.tab.o: %.y $(YAAC) -p $(shell perl -wlne 'print $$1 if /yaac-func-prefix:\s([a-z]+)/' $<) \ -o $(BUILD_DIR)/$(shell basename $< .y).tab.c $(YAAC_FLAGS) -d $< $(foreach tool,$(TOOLS),$(eval $(call TOOL_templ,$(tool)))) %:: ; $(TOOLS): $(LDQ) $(LDFLAGS) -o $@/$@ $(shell LC_ALL=C ls $@/*.o) $($@-libs) (patch) tree0616c0ff7d877e64d9c248a6cdff074eae258840 /fs/configfs parent9b284cbdb5de3b8871014f8290d1b540e5181c21 (diff)parent0f1db7dee200127da4c07928189748918c312031 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: "Assorted VFS fixes and related cleanups (IMO the most interesting in that part are f_path-related things and Eric's descriptor-related stuff). UFS regression fixes (it got broken last cycle). 9P fixes. fs-cache series, DAX patches, Jan's file_remove_suid() work" [ I'd say this is much more than "fixes and related cleanups". The file_table locking rule change by Eric Dumazet is a rather big and fundamental update even if the patch isn't huge. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits) 9p: cope with bogus responses from server in p9_client_{read,write} p9_client_write(): avoid double p9_free_req() 9p: forgetting to cancel request on interrupted zero-copy RPC dax: bdev_direct_access() may sleep block: Add support for DAX reads/writes to block devices dax: Use copy_from_iter_nocache dax: Add block size note to documentation fs/file.c: __fget() and dup2() atomicity rules fs/file.c: don't acquire files->file_lock in fd_install() fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation vfs: avoid creation of inode number 0 in get_next_ino namei: make set_root_rcu() return void make simple_positive() public ufs: use dir_pages instead of ufs_dir_pages() pagemap.h: move dir_pages() over there remove the pointless include of lglock.h fs: cleanup slight list_entry abuse xfs: Correctly lock inode when removing suid and file capabilities fs: Call security_ops->inode_killpriv on truncate fs: Provide function telling whether file_remove_privs() will do anything ...
Diffstat (limited to 'fs/configfs')