summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-15 07:06:20 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-15 07:06:20 +0100
commite9582f8c8a2ed6032f688f35dc399c0adf96caf1 (patch)
tree52fe69e591a917f38b6ccb20561d110d05fc4a9e
parent66d170e19e305a86532fa6a7bc23b47dc40fecb4 (diff)
Build the list of objects dynamically
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5ec3953..89072c0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@ CFLAGS = \
-D _GNU_SOURCE -O2 -std=gnu11 -ggdb3
BINARY = cpiday
-OBJECTS = main.o
+SOURCES = $(wildcard *.c)
+OBJECTS = $(SOURCES:.c=.o)
$(BINARY): $(OBJECTS)
$(CC) -o $@ $^ -lm