From 0039b3f8327960de697a08ebdf88e947a6a482dd Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 16 Jan 2021 13:21:32 +0100 Subject: Fix linker argument order (fixes #36) Thanks @elig0n ! --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 -- cgit