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:
Johannes Berg 2020-09-18 11:49:51 +02:00 committed by Jouni Malinen
parent 06a6adb54e
commit 0430bc8267
10 changed files with 26 additions and 23 deletions

View file

@ -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)