Compare commits

...

2 Commits

Author SHA1 Message Date
Valentin Ochs c7cec60790 gitignore 2021-03-09 15:47:54 +01:00
Valentin Ochs 6ca2a017d0 Makefile 2021-03-09 15:47:28 +01:00
2 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
key
poll_desfire
compile_commands.json
/poll_desfire_v*.tar.gz

View File

@ -1,9 +1,21 @@
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 $@
clean:
rm -f poll_desfire *.o
.PHONY: all clean
release: poll_desfire_v$(VERSION).tar.gz
poll_desfire_v$(VERSION).tar.gz: poll_desfire.c Makefile
tar czf $@ --transform='s,^,poll_desfire_v$(VERSION)/,' $^
install: all
install -D -m 0755 -t $(PREFIX)/bin/ poll_desfire
.PHONY: all clean release