mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-09 06:04:05 +08:00
8b6eb56a95
Use GCC's -MD feature to generate a dependency file for each feature test .c file, and include that .d file in the config/feature-checks/Makefile. This allows us to do two things: - speed up feature tests - detect removal or changes in build dependencies - including system libraries/headers Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-Jfma8pmPnnqzpxjbs3hpgmsj@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
21 lines
222 B
Makefile
21 lines
222 B
Makefile
|
|
FILES=test-hello
|
|
|
|
CC := $(CC) -MD
|
|
|
|
all: $(FILES)
|
|
|
|
BUILD = $(CC) -o $(OUTPUT)$@ $@.c
|
|
|
|
###############################
|
|
|
|
test-hello:
|
|
$(BUILD)
|
|
|
|
-include *.d */*.d
|
|
|
|
###############################
|
|
|
|
clean:
|
|
rm -f $(FILES) *.d
|