Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -23,12 +23,12 @@ CPPFLAGS := $(CFLAGS) export CFLAGS CXXFLAGS CPPFLAGS all: libpcsc.a -libpcsc.a: pcsc/Makefile pcsc/pcsc-nacl.h pcsc/pcsc_nacl_init.cc $(shell find pcsc/src -type f) - $(MAKE) -C pcsc +libpcsc.a: pcsc/Makefile pcsc/pcsc-nacl.h pcsc/pcsc_nacl_init.cc $(shell find pcsc/src -type f) boost + $(MAKE) -C pcsc BOOST_DIR='$(shell pwd)/boost' cp pcsc/libpcsc.a libpcsc.a.new mv libpcsc.a.new libpcsc.a boost: build-boost rm -rf boost @@ -36,14 +36,16 @@ clean: $(MAKE) -C pcsc clean rm -f libpcsc.a rm -f libpcsc.a.new + rm -rf workdir-* + rm -rf boost.new distclean: clean rm -rf boost $(MAKE) -C pcsc distclean mrproper: distclean rm -rf pcsc/src .PHONY: all Index: build/assemble-source-from-google.sh ================================================================== --- build/assemble-source-from-google.sh +++ build/assemble-source-from-google.sh @@ -40,14 +40,79 @@ 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 # Assemble all the files into a single tree - for file in logging.h scard_structs_serialization.h dom_requests_manager.h thread_safe_string_pool.h \ - pp_var_utils.cc pp_var_utils.h scard_structs_serialization.cc dom_requests_manager.cc logging.cc; do - find . -type f -name "${file}" -exec cp '{}' "${instdir}" ';' + files=( + common/cpp/src/google_smart_card_common/formatting.h + common/cpp/src/google_smart_card_common/logging/function_call_tracer.cc + common/cpp/src/google_smart_card_common/logging/function_call_tracer.h + common/cpp/src/google_smart_card_common/logging/hex_dumping.cc + common/cpp/src/google_smart_card_common/logging/hex_dumping.h + common/cpp/src/google_smart_card_common/logging/logging.cc + common/cpp/src/google_smart_card_common/logging/logging.h + common/cpp/src/google_smart_card_common/logging/mask_dumping.h + common/cpp/src/google_smart_card_common/messaging/message_listener.h + common/cpp/src/google_smart_card_common/messaging/typed_message.cc + common/cpp/src/google_smart_card_common/messaging/typed_message.h + common/cpp/src/google_smart_card_common/messaging/typed_message_listener.h + common/cpp/src/google_smart_card_common/messaging/typed_message_router.cc + common/cpp/src/google_smart_card_common/messaging/typed_message_router.h + common/cpp/src/google_smart_card_common/multi_string.cc + common/cpp/src/google_smart_card_common/multi_string.h + common/cpp/src/google_smart_card_common/numeric_conversions.cc + common/cpp/src/google_smart_card_common/numeric_conversions.h + common/cpp/src/google_smart_card_common/optional.h + common/cpp/src/google_smart_card_common/pp_var_utils/construction.cc + common/cpp/src/google_smart_card_common/pp_var_utils/construction.h + common/cpp/src/google_smart_card_common/pp_var_utils/copying.cc + common/cpp/src/google_smart_card_common/pp_var_utils/copying.h + common/cpp/src/google_smart_card_common/pp_var_utils/debug_dump.cc + common/cpp/src/google_smart_card_common/pp_var_utils/debug_dump.h + common/cpp/src/google_smart_card_common/pp_var_utils/extraction.cc + common/cpp/src/google_smart_card_common/pp_var_utils/extraction.h + common/cpp/src/google_smart_card_common/pp_var_utils/operations.h + common/cpp/src/google_smart_card_common/pp_var_utils/struct_converter.h + common/cpp/src/google_smart_card_common/requesting/async_request.cc + common/cpp/src/google_smart_card_common/requesting/async_request.h + common/cpp/src/google_smart_card_common/requesting/async_requests_storage.cc + common/cpp/src/google_smart_card_common/requesting/async_requests_storage.h + common/cpp/src/google_smart_card_common/requesting/js_requester.cc + common/cpp/src/google_smart_card_common/requesting/js_requester.h + common/cpp/src/google_smart_card_common/requesting/remote_call_adaptor.cc + common/cpp/src/google_smart_card_common/requesting/remote_call_adaptor.h + common/cpp/src/google_smart_card_common/requesting/remote_call_message.cc + common/cpp/src/google_smart_card_common/requesting/remote_call_message.h + common/cpp/src/google_smart_card_common/requesting/request_id.h + common/cpp/src/google_smart_card_common/requesting/request_result.cc + common/cpp/src/google_smart_card_common/requesting/request_result.h + common/cpp/src/google_smart_card_common/requesting/requester.cc + common/cpp/src/google_smart_card_common/requesting/requester.h + common/cpp/src/google_smart_card_common/requesting/requester_message.cc + common/cpp/src/google_smart_card_common/requesting/requester_message.h + common/cpp/src/google_smart_card_common/thread_safe_unique_ptr.h + common/cpp/src/google_smart_card_common/unique_ptr_utils.h + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite.h + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite_tracing_wrapper.cc + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite_tracing_wrapper.h + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_debug_dump.cc + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_debug_dump.h + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_structs_serialization.cc + third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_structs_serialization.h + third_party/pcsc-lite/naclport/cpp_client/src/google_smart_card_pcsc_lite_client/global.cc + third_party/pcsc-lite/naclport/cpp_client/src/google_smart_card_pcsc_lite_client/global.h + third_party/pcsc-lite/naclport/cpp_client/src/pcsc_lite_over_requester.cc + third_party/pcsc-lite/naclport/cpp_client/src/pcsc_lite_over_requester.h + third_party/pcsc-lite/src-1.8.15/src/error.c + ) + + for file in "${files[@]}"; do + instfile="${instdir}/$(basename "${file}")" + + sed 's@ "${instfile}" || exit 1 done + ) || return 1 rm -rf "${workdir}" return 0 Index: pcsc/Makefile ================================================================== --- pcsc/Makefile +++ pcsc/Makefile @@ -1,38 +1,39 @@ -CFLAGS += -Wall -std=gnu++11 -g3 -ggdb3 -CXXFLAGS += -Wall -std=gnu++11 -g3 -ggdb3 -CPPFLAGS += -I../src/src/PCSC +BOOST_DIR := /usr/include/boost +CFLAGS += -Wall -std=gnu11 -g3 -ggdb3 +CXXFLAGS += -Wall -std=gnu++11 -g3 -ggdb3 +CPPFLAGS += -Isrc/include/PCSC -isystem $(BOOST_DIR)/include -Isrc -isystem $(NACL_SDK_ROOT)/include -OBJS = pcsc_nacl.o pcsc_nacl_global.o scard_structs_serialization.o pp_var_utils.o logging.o dom_requests_manager.o pcsc_nacl_init.o +OBJS += +# pcsc_nacl_init.o all: libpcsc.a + +include Makefile.deps libpcsc.a: $(OBJS) rm -f libpcsc.a $(AR) rc libpcsc.a $(OBJS) -$(RANLIB) libpcsc.a -pcsc_nacl_init.o: pcsc_nacl_init.cc pcsc_nacl_global.h dom_requests_manager.h pcsc_nacl.h - -pcsc_nacl.o: pcsc_nacl.cc pcsc_nacl.h logging.h pp_var_utils.h scard_structs_serialization.h -pcsc_nacl.h: dom_requests_manager.h thread_safe_string_pool.h - -pcsc_nacl_global.o: pcsc_nacl_global.cc pcsc_nacl_global.h logging.h -pcsc_nacl_global.h: pcsc_nacl.h - -pp_var_utils.o: pp_var_utils.cc pp_var_utils.h logging.h -pp_var_utils.h: logging.h - -scard_structs_serialization.o: scard_structs_serialization.cc scard_structs_serialization.h pp_var_utils.h -scard_structs_serialization.h: pp_var_utils.h - -dom_requests_manager.o: dom_requests_manager.cc dom_requests_manager.h logging.h pp_var_utils.h - -logging.o: logging.cc logging.h +%.o: src/%.cc + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o "$@" $(filter %.cc,$^) + +%.o: src/%.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o "$@" $(filter %.c,$^) + +Makefile.deps: + rm -f Makefile.deps.new + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM src/*.cc > Makefile.deps.new + $(CC) $(CFLAGS) $(CPPFLAGS) -MM src/*.c >> Makefile.deps.new + grep ': ' Makefile.deps.new | cut -f 1 -d : | sed 's@^@OBJS += @' >> Makefile.deps.new + mv Makefile.deps.new Makefile.deps clean: rm -f $(OBJS) rm -f libpcsc.a + rm -f Makefile.deps.new distclean: clean + rm -f Makefile.deps .PHONY: all clean distclean