From 2a2e0997e771b4d9a15e12e2d8e4d1ffc6c95781 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 8 Apr 2011 03:38:36 -0700 Subject: [PATCH] core: Makefile don't worry about how deep the files are In preparation for importing lwip modify the makefile to not care how deeply nested the source files are in the tree. --- core/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/Makefile b/core/Makefile index 33ad7e9..44e1489 100644 --- a/core/Makefile +++ b/core/Makefile @@ -39,9 +39,9 @@ BTARGET = kwdhash.gen \ # All primary source files for the main syslinux files NASMSRC := $(wildcard *.asm) NASMHDR := $(wildcard *.inc) -CSRC := $(wildcard *.c */*.c */*/*.c) -SSRC := $(wildcard *.S */*.S */*/*.S) -CHDR := $(wildcard *.h) +CSRC := $(shell find . -name '*.c' -print) +SSRC := $(shell find . -name '*.S' -print) +CHDR := $(shell find . -name '*.h' -print) OTHERSRC := keywords ALLSRC = $(NASMSRC) $(NASMHDR) $(CSRC) $(SSRC) $(CHDR) $(OTHERSRC) @@ -125,10 +125,11 @@ install-all: install install-lib netinstall: installer tidy dist: - rm -f codepage.cp *.o *.elf *.a stupid.* patch.offset .depend .*.d + find . -type f \( -name '*.o' -o -name '*.a' -o -name '.*.d' \ + -o -name '*.lst' \) -print | xargs -rt rm -f + rm -f codepage.cp *.elf stupid.* patch.offset .depend rm -f *.elf.tmp *.sym - rm -f *.lsr *.lst *.map *.sec *.raw - rm -f */*.o */*/*.o */*.lst */*/*.lst */.*.d */*/.*.d + rm -f *.lsr *.map *.sec *.raw rm -f $(OBSOLETE) $(LIB) clean: tidy @@ -137,4 +138,4 @@ spotless: clean rm -f $(BTARGET) *.bin *_bin.c # Include dependencies file --include .*.d */.*.d */*/.*.d +-include $(shell find . -name '.*.d' -print) -- 2.7.4