summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2c0277f..316c9b8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@
CC ?= gcc
LOLCAT_SRC ?= lolcat.c
CENSOR_SRC ?= censor.c
-CFLAGS ?= -std=c11 -Wall -Wextra -O3 -Wno-sign-compare -lm
+CFLAGS ?= -std=c11 -Wall -Wextra -O3 -Wno-sign-compare
+LIBS := -lm
DESTDIR ?= /usr/local/bin
@@ -14,10 +15,10 @@ debug: all
.PHONY: install clean debug
lolcat: $(LOLCAT_SRC)
- $(CC) $(CFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
censor: $(CENSOR_SRC)
- $(CC) $(CFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
install: lolcat censor
install lolcat $(DESTDIR)/lolcat