| 1 |
# $Id$
|
| 2 |
|
| 3 |
CCID_BUNDLE = ifd-ccid.bundle
|
| 4 |
CCID_LIB = libccid.$(DYN_LIB_EXT)
|
| 5 |
CCIDTWIN_LIB = libccidtwin.$(DYN_LIB_EXT)
|
| 6 |
|
| 7 |
lib_LTLIBRARIES = libccid.la libccidtwin.la
|
| 8 |
bin_PROGRAMS = parse
|
| 9 |
|
| 10 |
COMMON = ccid.c \
|
| 11 |
ccid.h \
|
| 12 |
commands.c \
|
| 13 |
commands.h \
|
| 14 |
debug.c \
|
| 15 |
debug.h \
|
| 16 |
defs.h \
|
| 17 |
ifdhandler.c \
|
| 18 |
ifdhandler.h \
|
| 19 |
pcscdefines.h \
|
| 20 |
utils.c \
|
| 21 |
utils.h
|
| 22 |
USB = ccid_usb.c ccid_usb.h
|
| 23 |
SERIAL = ccid_serial.c ccid_serial.h
|
| 24 |
T1 = protocol_t1/apdu.h \
|
| 25 |
protocol_t1/atr.c \
|
| 26 |
protocol_t1/atr.h \
|
| 27 |
protocol_t1/defines.h \
|
| 28 |
protocol_t1/pps.c \
|
| 29 |
protocol_t1/pps.h \
|
| 30 |
protocol_t1/protocol_t1.c \
|
| 31 |
protocol_t1/protocol_t1.h \
|
| 32 |
protocol_t1/t1_block.c \
|
| 33 |
protocol_t1/t1_block.h
|
| 34 |
|
| 35 |
# needed for MacOS X
|
| 36 |
if NEED_PARSER
|
| 37 |
TOKEN_PARSER = tokenparser_macosx.l
|
| 38 |
endif
|
| 39 |
|
| 40 |
libccid_la_SOURCES = $(COMMON) $(USB) $(TOKEN_PARSER) $(T1)
|
| 41 |
libccid_la_LIBADD = @LIBDL@ @LEXLIB@ @COREFOUNDATION@ @IOKIT@ @LIBUSB@
|
| 42 |
|
| 43 |
libccidtwin_la_SOURCES = $(COMMON) $(SERIAL) $(T1)
|
| 44 |
libccidtwin_la_CFLAGS = -DTWIN_SERIAL
|
| 45 |
|
| 46 |
parse_SOURCES = tokenparser.l parse.c parser.h
|
| 47 |
parse_LDADD = libccid.la
|
| 48 |
|
| 49 |
EXTRA_DIST = Info.plist reader.conf.in
|
| 50 |
|
| 51 |
tokenparser_macosx.l: tokenparser.l
|
| 52 |
cp -f $^ $@
|
| 53 |
|
| 54 |
# do not install the serial driver by default
|
| 55 |
# use explicitely 'make install_ccidtwin'
|
| 56 |
install: install_ccid
|
| 57 |
|
| 58 |
install_ccid: libccid.la
|
| 59 |
$(mkinstalldirs) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/
|
| 60 |
cp .libs/$(CCID_LIB) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/$(CCID_LIB).$(VERSION)
|
| 61 |
sed s/VERSION/$(VERSION)/ $(srcdir)/Info.plist | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist
|
| 62 |
|
| 63 |
install_ccidtwin: libccidtwin.la
|
| 64 |
$(mkinstalldirs) $(DESTDIR)$(ccidtwindir)
|
| 65 |
cp .libs/$(CCIDTWIN_LIB) $(DESTDIR)$(ccidtwindir)/$(CCIDTWIN_LIB).$(VERSION)
|
| 66 |
if [ -e $(DESTDIR)/etc/reader.conf ] ; \
|
| 67 |
then \
|
| 68 |
echo "Edit existing /etc/reader.conf" ; \
|
| 69 |
else \
|
| 70 |
$(mkinstalldirs) $(DESTDIR)/etc ; \
|
| 71 |
perl -ne "s|TARGET|$(ccidtwindir)/$(CCIDTWIN_LIB).$(VERSION)| ; print" $(srcdir)/reader.conf.in > $(DESTDIR)/etc/reader.conf ; \
|
| 72 |
fi
|
| 73 |
|
| 74 |
# do not uninstall the serial driver by default
|
| 75 |
# use explicitely 'make uninstall_ccidtwin'
|
| 76 |
uninstall: uninstall_ccid
|
| 77 |
|
| 78 |
uninstall_ccid:
|
| 79 |
rm -rf $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)
|
| 80 |
|
| 81 |
uninstall_ccidtwin:
|
| 82 |
rm -f $(DESTDIR)$(ccidtwindir)/$(CCIDTWIN_LIB).$(VERSION)
|
| 83 |
|