2011-06-27 09:58:20 +00:00
|
|
|
libcacard_includedir=$(includedir)/cacard
|
|
|
|
|
2012-12-21 07:34:49 +00:00
|
|
|
TOOLS += vscclient$(EXESUF)
|
2011-05-15 08:51:28 +00:00
|
|
|
|
|
|
|
# objects linked into a shared library, built with libtool with -fPIC if required
|
2014-05-08 08:30:48 +00:00
|
|
|
libcacard-obj-y = $(libcacard-y)
|
2012-12-21 08:16:33 +00:00
|
|
|
libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y))
|
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standard
for smartcards. It is used by the emulated ccid card introduced in
a following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>
---
changes from v24->v25:
* Fix out of tree builds.
* Fix build with linux-user targets.
changes from v23->v24: (Jes Sorensen review 2)
* Makefile.target: use obj-$(CONFIG_*) +=
* remove unrequired includes, include qemu-common before qemu-thread
* required adding #define NO_NSPR_10_SUPPORT (harmless)
changes from v22->v23:
* configure fixes: (reported by Stefan Hajnoczi)
* test a = b, not a == b (second isn't portable)
* quote $source_path in case it contains spaces
- this doesn't really help since there are many other places
that need similar fixes, not introduced by this patch.
changes from v21->v22:
* fix configure to not link libcacard if nss not found
(reported by Stefan Hajnoczi)
* fix vscclient linkage with simpletrace backend
(reported by Stefan Hajnoczi)
* card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
(reported by William van de Velde)
changes from v20->v21: (Jes Sorensen review)
* use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
and qemu_free), error_report
* assert instead of ASSERT
* cosmetic fixes
* use strpbrk and isspace
* add --disable-nss --enable-nss here, instead of in the final patch.
* split vscclient, passthru and docs to following patches.
changes from v19->v20:
* checkpatch.pl
changes from v15->v16:
Build:
* don't erase self with distclean
* fix make clean after make distclean
* Makefile: make vscclient link quiet
Behavioral:
* vcard_emul_nss: load coolkey in more situations
* vscclient:
* use hton,ntoh
* send init on connect, only start vevent thread on response
* read payload after header check, before type switch
* remove Reconnect
* update for vscard_common changes, empty Flush implementation
Style/Whitespace:
* fix wrong variable usage
* remove unused variable
* use only C style comments
* add copyright header
* fix tabulation
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard: fix out of tree builds
2010-11-28 14:36:38 +00:00
|
|
|
|
2012-12-20 17:57:45 +00:00
|
|
|
# libtool will build the .o files, too
|
|
|
|
$(libcacard-obj-y): | $(libcacard-lobj-y)
|
|
|
|
|
2012-12-21 07:34:49 +00:00
|
|
|
all: libcacard.la libcacard.pc
|
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standard
for smartcards. It is used by the emulated ccid card introduced in
a following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>
---
changes from v24->v25:
* Fix out of tree builds.
* Fix build with linux-user targets.
changes from v23->v24: (Jes Sorensen review 2)
* Makefile.target: use obj-$(CONFIG_*) +=
* remove unrequired includes, include qemu-common before qemu-thread
* required adding #define NO_NSPR_10_SUPPORT (harmless)
changes from v22->v23:
* configure fixes: (reported by Stefan Hajnoczi)
* test a = b, not a == b (second isn't portable)
* quote $source_path in case it contains spaces
- this doesn't really help since there are many other places
that need similar fixes, not introduced by this patch.
changes from v21->v22:
* fix configure to not link libcacard if nss not found
(reported by Stefan Hajnoczi)
* fix vscclient linkage with simpletrace backend
(reported by Stefan Hajnoczi)
* card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
(reported by William van de Velde)
changes from v20->v21: (Jes Sorensen review)
* use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
and qemu_free), error_report
* assert instead of ASSERT
* cosmetic fixes
* use strpbrk and isspace
* add --disable-nss --enable-nss here, instead of in the final patch.
* split vscclient, passthru and docs to following patches.
changes from v19->v20:
* checkpatch.pl
changes from v15->v16:
Build:
* don't erase self with distclean
* fix make clean after make distclean
* Makefile: make vscclient link quiet
Behavioral:
* vcard_emul_nss: load coolkey in more situations
* vscclient:
* use hton,ntoh
* send init on connect, only start vevent thread on response
* read payload after header check, before type switch
* remove Reconnect
* update for vscard_common changes, empty Flush implementation
Style/Whitespace:
* fix wrong variable usage
* remove unused variable
* use only C style comments
* add copyright header
* fix tabulation
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard: fix out of tree builds
2010-11-28 14:36:38 +00:00
|
|
|
|
2012-12-21 07:42:03 +00:00
|
|
|
vscclient$(EXESUF): libcacard/vscclient.o libcacard.la
|
2012-12-21 08:13:10 +00:00
|
|
|
$(call LINK,$^)
|
2012-10-04 11:09:59 +00:00
|
|
|
|
2011-05-15 08:51:28 +00:00
|
|
|
#########################################################################
|
|
|
|
# Rules for building libcacard standalone library
|
|
|
|
|
2012-12-20 17:19:51 +00:00
|
|
|
libcacard.la: LDFLAGS += -rpath $(libdir) -no-undefined \
|
2014-05-08 08:30:49 +00:00
|
|
|
-export-symbols $(SRC_PATH)/libcacard/libcacard.syms
|
2015-02-03 11:31:30 +00:00
|
|
|
# Prevent libcacard.so linking against the entire world of 3rd party libs
|
|
|
|
libcacard.la: LIBS =
|
2012-12-21 08:16:33 +00:00
|
|
|
libcacard.la: $(libcacard-lobj-y)
|
2012-12-21 08:13:10 +00:00
|
|
|
$(call LINK,$^)
|
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standard
for smartcards. It is used by the emulated ccid card introduced in
a following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>
---
changes from v24->v25:
* Fix out of tree builds.
* Fix build with linux-user targets.
changes from v23->v24: (Jes Sorensen review 2)
* Makefile.target: use obj-$(CONFIG_*) +=
* remove unrequired includes, include qemu-common before qemu-thread
* required adding #define NO_NSPR_10_SUPPORT (harmless)
changes from v22->v23:
* configure fixes: (reported by Stefan Hajnoczi)
* test a = b, not a == b (second isn't portable)
* quote $source_path in case it contains spaces
- this doesn't really help since there are many other places
that need similar fixes, not introduced by this patch.
changes from v21->v22:
* fix configure to not link libcacard if nss not found
(reported by Stefan Hajnoczi)
* fix vscclient linkage with simpletrace backend
(reported by Stefan Hajnoczi)
* card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
(reported by William van de Velde)
changes from v20->v21: (Jes Sorensen review)
* use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
and qemu_free), error_report
* assert instead of ASSERT
* cosmetic fixes
* use strpbrk and isspace
* add --disable-nss --enable-nss here, instead of in the final patch.
* split vscclient, passthru and docs to following patches.
changes from v19->v20:
* checkpatch.pl
changes from v15->v16:
Build:
* don't erase self with distclean
* fix make clean after make distclean
* Makefile: make vscclient link quiet
Behavioral:
* vcard_emul_nss: load coolkey in more situations
* vscclient:
* use hton,ntoh
* send init on connect, only start vevent thread on response
* read payload after header check, before type switch
* remove Reconnect
* update for vscard_common changes, empty Flush implementation
Style/Whitespace:
* fix wrong variable usage
* remove unused variable
* use only C style comments
* add copyright header
* fix tabulation
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard: fix out of tree builds
2010-11-28 14:36:38 +00:00
|
|
|
|
2012-12-21 07:34:49 +00:00
|
|
|
libcacard.pc: $(SRC_PATH)/libcacard/libcacard.pc.in
|
2012-06-10 10:18:54 +00:00
|
|
|
$(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
|
2011-06-27 09:58:20 +00:00
|
|
|
-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
|
|
|
|
-e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
|
2012-12-21 07:34:49 +00:00
|
|
|
-e 's|@PREFIX@|$(prefix)|' $< > libcacard.pc,\
|
2012-06-10 10:18:54 +00:00
|
|
|
" GEN $@")
|
2011-06-27 09:58:20 +00:00
|
|
|
|
|
|
|
.PHONY: install-libcacard
|
|
|
|
|
2012-12-21 07:34:49 +00:00
|
|
|
install: install-libcacard
|
|
|
|
install-libcacard: libcacard.pc libcacard.la
|
2011-05-15 08:51:28 +00:00
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
|
2011-06-27 09:58:20 +00:00
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
|
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
|
2012-12-20 17:57:45 +00:00
|
|
|
$(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)"
|
|
|
|
$(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
|
2012-12-21 07:34:49 +00:00
|
|
|
for inc in $(SRC_PATH)/libcacard/*.h; do \
|
|
|
|
$(INSTALL_DATA) $$inc "$(DESTDIR)$(libcacard_includedir)"; \
|
2011-06-27 09:58:20 +00:00
|
|
|
done
|