diff --git a/Makefile b/Makefile index 51452f1..b732920 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ -CFLAGS += -Wall -pedantic --std=c99 $(shell pkg-config --cflags libfreefare) -g -O0 -D_POSIX_C_SOURCE=200809L -LDFLAGS += $(shell pkg-config --libs libfreefare) VERSION ?= $(shell git rev-parse --short HEAD) all: poll_desfire poll_desfire: poll_desfire.o - $(CC) $(LDFLAGS) $^ -o $@ + $(CC) $(LDFLAGS) $(shell $(PKG_CONFIG) --libs libfreefare) $^ -o $@ + +%.o: %.c + $(CC) $(CFLAGS) -Wall -pedantic --std=c99 $(shell $(PKG_CONFIG) --cflags libfreefare) -g -O0 -D_POSIX_C_SOURCE=200809L -c $^ -o $@ clean: rm -f poll_desfire *.o