aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4eaa45b..4d7d348 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
-CFLAGS = -Wall -std=c11 -ggdb -D_POSIX_C_SOURCE=200809L
-LDLIBS = -lncurses
+libs = ncurses chibi-scheme
+
+PKG_CONFIG=env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config
+
+CFLAGS = -Wall -std=c11 -ggdb -D_POSIX_C_SOURCE=200809L \
+ $(shell $(PKG_CONFIG) -cflags $(libs))
+LDLIBS = $(shell $(PKG_CONFIG) -libs $(libs))
.PHONY: all
all: analyze_gz ui
@@ -7,13 +12,12 @@ all: analyze_gz ui
analyze_gz: analyze_gz.o hexdump_pretty.o
$(CC) $^ -o $@ $(LDLIBS)
-ui: ui.o format.o
+ui: ui.o
$(CC) $^ -o $@ $(LDLIBS)
analyze_gz.o: analyze_gz.c hexdump_pretty.h gzip.h
hexdump_pretty.o: hexdump_pretty.c hexdump_pretty.h
-format.o: format.c format.h gzip.h
-ui.o: ui.c format.h
+ui.o: ui.c
clean:
-rm *.o