-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
49 lines (34 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $Id: Makefile 4192 2009-05-10 15:48:14Z rousseau $
# PC/SC Lite libraries and headers.
PCSC_CFLAGS ?= $(shell pkg-config libpcsclite --cflags)
PCSC_LDLIBS ?= $(shell pkg-config libpcsclite --libs)
# by default install in /usr/local
DESTDIR ?= /usr/local
VERSION := $(shell pwd | sed s/.*tools-//)
CFLAGS := -Wall -O2 -g -DVERSION=\"$(VERSION)\" $(PCSC_CFLAGS)
LDLIBS := $(PCSC_LDLIBS)
# On xBSD systems use
#LDLIBS = -lc_r $(PCSC_LDLIBS)
# on MacOSX
#CFLAGS = -Wall -O2 -DVERSION=\"$(VERSION)\"
#LDLIBS = -framework PCSC
BIN = pcsc_scan
BIN_SCRIPT = ATR_analysis gscriptor scriptor
MAN = pcsc_scan.1.gz gscriptor.1p.gz scriptor.1p.gz ATR_analysis.1p.gz
all: $(BIN) $(MAN)
pcsc_scan: pcsc_scan.o
install: all
install -d $(DESTDIR)/bin/
install $(BIN) $(DESTDIR)/bin/
install $(BIN_SCRIPT) $(DESTDIR)/bin/
install -d $(DESTDIR)/share/pcsc
install -m 644 smartcard_list.txt $(DESTDIR)/share/pcsc
install -d $(DESTDIR)/share/man/man1/
install -m 644 $(MAN) $(DESTDIR)/share/man/man1/
clean:
rm -f pcsc_scan.o $(BIN) $(MAN)
%.1.gz: %.1
gzip --best $^ --to-stdout > $@
%.1p.gz: %.1p
gzip --best $^ --to-stdout > $@
.PHONY: clean all install