2011-06-27 11:58:20 +02:00
|
|
|
libcacard_includedir=$(includedir)/cacard
|
|
|
|
|
2012-12-21 08:34:49 +01:00
|
|
|
TOOLS += vscclient$(EXESUF)
|
2011-05-15 10:51:28 +02:00
|
|
|
|
|
|
|
# objects linked into a shared library, built with libtool with -fPIC if required
|
2012-12-21 09:45:20 +01:00
|
|
|
libcacard-obj-y = $(stub-obj-y) $(libcacard-y)
|
2013-08-22 11:29:02 +02:00
|
|
|
libcacard-obj-y += util/osdep.o util/cutils.o util/qemu-timer-common.o
|
|
|
|
libcacard-obj-y += util/error.o util/qemu-error.o
|
2012-12-20 15:58:44 +01:00
|
|
|
libcacard-obj-$(CONFIG_WIN32) += util/oslib-win32.o util/qemu-thread-win32.o
|
|
|
|
libcacard-obj-$(CONFIG_POSIX) += util/oslib-posix.o util/qemu-thread-posix.o
|
2012-12-21 09:45:20 +01:00
|
|
|
libcacard-obj-y += $(filter trace/%, $(util-obj-y))
|
2012-12-20 18:24:27 +01:00
|
|
|
|
2012-12-21 09:16:33 +01: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 15:36:38 +01:00
|
|
|
|
2012-12-20 18:57:45 +01:00
|
|
|
# libtool will build the .o files, too
|
|
|
|
$(libcacard-obj-y): | $(libcacard-lobj-y)
|
|
|
|
|
2012-12-21 08:34:49 +01: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 15:36:38 +01:00
|
|
|
|
2012-12-21 08:42:03 +01:00
|
|
|
vscclient$(EXESUF): libcacard/vscclient.o libcacard.la
|
2012-12-21 09:13:10 +01:00
|
|
|
$(call LINK,$^)
|
2012-10-04 13:09:59 +02:00
|
|
|
|
2011-05-15 10:51:28 +02:00
|
|
|
#########################################################################
|
|
|
|
# Rules for building libcacard standalone library
|
|
|
|
|
2012-12-20 18:19:51 +01:00
|
|
|
libcacard.la: LDFLAGS += -rpath $(libdir) -no-undefined \
|
|
|
|
-export-syms $(SRC_PATH)/libcacard/libcacard.syms
|
2014-01-30 14:56:49 +01:00
|
|
|
libcacard.la: LIBS = $(libcacard_libs)
|
2012-12-21 09:16:33 +01:00
|
|
|
libcacard.la: $(libcacard-lobj-y)
|
2012-12-21 09:13:10 +01: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 15:36:38 +01:00
|
|
|
|
2012-12-21 08:34:49 +01:00
|
|
|
libcacard.pc: $(SRC_PATH)/libcacard/libcacard.pc.in
|
2012-06-10 12:18:54 +02:00
|
|
|
$(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
|
2011-06-27 11:58:20 +02:00
|
|
|
-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
|
|
|
|
-e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
|
2012-12-21 08:34:49 +01:00
|
|
|
-e 's|@PREFIX@|$(prefix)|' $< > libcacard.pc,\
|
2012-06-10 12:18:54 +02:00
|
|
|
" GEN $@")
|
2011-06-27 11:58:20 +02:00
|
|
|
|
|
|
|
.PHONY: install-libcacard
|
|
|
|
|
2012-12-21 08:34:49 +01:00
|
|
|
install: install-libcacard
|
|
|
|
install-libcacard: libcacard.pc libcacard.la
|
2011-05-15 10:51:28 +02:00
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
|
2011-06-27 11:58:20 +02:00
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
|
|
|
|
$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
|
2012-12-20 18:57:45 +01:00
|
|
|
$(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)"
|
|
|
|
$(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
|
2012-12-21 08:34:49 +01:00
|
|
|
for inc in $(SRC_PATH)/libcacard/*.h; do \
|
|
|
|
$(INSTALL_DATA) $$inc "$(DESTDIR)$(libcacard_includedir)"; \
|
2011-06-27 11:58:20 +02:00
|
|
|
done
|