From dafc4df642489cc6c704d5c23bf60e199816f6ad Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Thu, 15 Feb 2018 07:09:27 +0100 Subject: Add a LIBS variable --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 89072c0..8770697 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,10 @@ CFLAGS = \ BINARY = cpiday SOURCES = $(wildcard *.c) OBJECTS = $(SOURCES:.c=.o) +LIBS = -lm $(BINARY): $(OBJECTS) - $(CC) -o $@ $^ -lm + $(CC) -o $@ $^ $(LIBS) %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< -- cgit v1.2.3