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
1 changed files with 4 additions and 2 deletions

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)