Makefile: fix ordering of linker flags

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2024-04-01 12:27:46 -04:00
parent abdecf3fe3
commit d8023d00db
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED

View file

@ -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)