VERSION = 3 PATCHLEVEL = 7 lastword = $(word $(words $(1)),$(1)) makedir := $(dir $(call lastword,$(MAKEFILE_LIST))) ifeq ("$(origin V)", "command line") VERBOSE := $(V) endif ifneq ($(VERBOSE),1) Q := @ endif MAKEARGS := -C $(shell cd $(CURDIR)/../linux; pwd) MAKEARGS += O=$(if $(patsubst /%,,$(makedir)),$(CURDIR)/)$(patsubst %/,%,$(makedir)) MAKEFLAGS += --no-print-directory .PHONY: all $(MAKECMDGOALS) all := $(filter-out all Makefile,$(MAKECMDGOALS)) all: $(Q)$(MAKE) $(MAKEARGS) $(all) Makefile:; $(all): all @: %/: all @: