From 8e4026230611a7aac5f9e240007f5f5abc4841b5 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 29 Mar 2023 23:40:25 +0200 Subject: Makefile: make -MF write to .d file instead of stdout This way, the default rule for .c.o can be used, simplifying the Makefile a bit more. --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 36bc50f..14b1c29 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PROJECT = slcl O = -Og CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit. -CFLAGS = $(O) $(CDEFS) -g -Wall -Idynstr/include -MD -MF - +CFLAGS = $(O) $(CDEFS) -g -Wall -Idynstr/include -MD -MF $(@:.o=.d) LIBS = -lcjson -lssl -lm -lcrypto LDFLAGS = $(LIBS) DEPS = $(OBJECTS:.o=.d) @@ -30,7 +30,4 @@ clean: $(PROJECT): $(OBJECTS) $(CC) $(OBJECTS) $(LDFLAGS) -o $@ -.c.o: - $(CC) $(CFLAGS) -c $< -o $@ > $(@:.o=.d) - -include $(DEPS) -- cgit v1.2.3