Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,5 +1,9 @@ +# Prefix +PREFIX = /usr/local +prefix = $(PREFIX) + # Setup cross-compiler toolchain ## Set path to include the tools PATH := ${PATH}:${NACL_SDK_ROOT}/toolchain/linux_pnacl/bin export PATH @@ -32,17 +36,26 @@ libpcsc.h: pcsc/libpcsc.h cp pcsc/libpcsc.h libpcsc.h.new mv libpcsc.h.new libpcsc.h -libpcsc.js: pcsc/libpcsc.js - cp pcsc/libpcsc.js libpcsc.js.new +libpcsc.js: pcsc/src/libpcsc.js + cp pcsc/src/libpcsc.js libpcsc.js.new mv libpcsc.js.new libpcsc.js boost: build-boost rm -rf boost ./build-boost + +install: libpcsc.a libpcsc.h libpcsc.js $(shell find pcsc/src/include -type f) + mkdir -p "$(DESTDIR)$(prefix)/lib" + mkdir -p "$(DESTDIR)$(prefix)/include" + mkdir -p "$(DESTDIR)$(prefix)/js" + cp libpcsc.a "$(DESTDIR)$(prefix)/lib" + cp libpcsc.h "$(DESTDIR)$(prefix)/include" + cp libpcsc.js "$(DESTDIR)$(prefix)/js" + cp -r pcsc/src/include/PCSC "$(DESTDIR)$(prefix)/include" clean: $(MAKE) -C pcsc clean rm -f libpcsc.a libpcsc.a.new rm -f libpcsc.h libpcsc.h.new Index: build/assemble-source-from-google.sh ================================================================== --- build/assemble-source-from-google.sh +++ build/assemble-source-from-google.sh @@ -35,13 +35,13 @@ # Copy out PC/SC headers for later use mkdir -p "${instdir}/include/PCSC" || exit 1 cp third_party/pcsc-lite/src-*/src/PCSC/*.h "${instdir}/include/PCSC" || exit 1 # Copy out JavaScript files for later use - mkdir "${instdir}/js" || exit 1 # cp common-utils/*.js "${instdir}/js" || exit 1 # cp third_party/pcsc-lite/client-side/*.js "${instdir}/js" || exit 1 + touch "${instdir}/libpcsc.js" # Assemble all the files into a single tree files=( common/cpp/src/google_smart_card_common/formatting.h common/cpp/src/google_smart_card_common/logging/function_call_tracer.cc