From d8023d00db66200cd343391c137e96398ba3622b Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 1 Apr 2024 12:27:46 -0400 Subject: [PATCH] Makefile: fix ordering of linker flags Signed-off-by: Vincent Batts --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3c0c0f4..ab35d5b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -CFLAGS += $(shell pkg-config --libs --cflags zlib) +CFLAGS += $(shell pkg-config --cflags zlib) CFLAGS += -Wall -g +LDFLAGS += $(shell pkg-config --libs zlib) + ifndef CC CC = gcc endif @@ -12,7 +14,7 @@ TMP_FILES = $(wildcard *~) all: $(APP) unpack: unpack.c huffman.c huffman.h - $(CC) $(CFLAGS) -o $@ unpack.c huffman.c huffman.h + $(CC) $(CFLAGS) -o $@ unpack.c huffman.c huffman.h $(LDFLAGS) clean: rm -rf $(APP) $(TMP_FILES)