aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-29 23:40:25 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-20 23:52:53 +0200
commit8e4026230611a7aac5f9e240007f5f5abc4841b5 (patch)
tree4319267e5eb9a64c8edad6d69dc6ec32a1de2297
parentaf16aa6702ffb385a36504a459210e94704bbe2b (diff)
downloadlibweb-8e4026230611a7aac5f9e240007f5f5abc4841b5.tar.gz
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.
-rw-r--r--Makefile5
1 files changed, 1 insertions, 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)