build: Add a common-clean target
Clean up in a more common fashion as well, initially for ../src/. Also add $(Q) to the clean target in src/ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
06a6adb54e
commit
0430bc8267
10 changed files with 26 additions and 23 deletions
|
@ -4,6 +4,9 @@ all: $(VERIFY) $(ALL) $(EXTRA_TARGETS)
|
|||
# disable built-in rules
|
||||
.SUFFIXES:
|
||||
|
||||
ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
ROOTDIR := $(dir $(ROOTDIR:%/=%))
|
||||
|
||||
ifndef CC
|
||||
CC=gcc
|
||||
endif
|
||||
|
@ -44,3 +47,8 @@ else
|
|||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||
@$(E) " CC " $<
|
||||
endif
|
||||
|
||||
.PHONY: common-clean
|
||||
common-clean:
|
||||
$(Q)$(MAKE) -C $(ROOTDIR)/src clean
|
||||
$(Q)rm -f $(ALL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue