From 972447bc2541034c85fec5d47f2bace03124c00b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 1 Sep 2015 21:27:15 +0200 Subject: fix some more errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 19cba87..34ef7a9 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ CCFLAGS_SLIBC_DEFS = -D_SLIBC_SOURCE=1 -D_GNU_SOURCE=1 -D_BSD_SOURCE=1 -D_SLIBC_ -D_POSIX_C_SOURCE=999999L -D_XOPEN_SOURCE=9999 # Flag that specifies which C dialect the library is written. -CCFLAGS_CSTD = -std=gnu11 +CCFLAGS_CSTD = -std=c11 # Flags that specify where the system header files (that would in this case # be this library's header files) are located. @@ -61,6 +61,12 @@ MMFLAGS = $(CCFLAGS_COMMON) -MG # Object files to build. OBJECTS = $(shell find src | grep '\.c$$' | sed -e 's:^src/:obj/:' -e 's:\.c$$:\.o:') +# All header files. +HEADERS = $(shell find . | grep '\.h$$' | sed -e 's:^\./::') + +# All code files. +SOURCES = $(shell find src | grep '\.c$$') + # You may add config.mk to the topmost directory @@ -93,7 +99,7 @@ obj/%.o: # Generate list of file dependencies for object files. -obj/deps.mk: Makefile +obj/deps.mk: Makefile $(HEADERS) $(SOURCES) @mkdir -p obj find src | grep '\.c$$' | xargs $(CC) -MM $(MMFLAGS) > $@ sed -i 's#^[^ :]*\.o: src\([^ ]*\)/[^ /]*\.c#obj\1/&#' $@ -- cgit v1.2.3-70-g09d2