NaCl libpcsc

Check-in [6d016db860]
Login
Overview
SHA1:6d016db86015232c105f75ccebfca6ea1fc7584f
Date: 2016-04-14 00:54:47
User: rkeene
Comment:We now build a mostly complete libpcsc.a, though with no way to initialize it (since we have not discovered how to do that in this release of Google's code yet
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-04-14
02:28
[3dc3a3b281] More work towards something possibly usable one day (user: rkeene, tags: trunk)
00:54
[6d016db860] We now build a mostly complete libpcsc.a, though with no way to initialize it (since we have not discovered how to do that in this release of Google's code yet (user: rkeene, tags: trunk)
2016-04-13
22:13
[60c7795ca7] Better targets (user: rkeene, tags: trunk)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified Makefile from [7ceeb916bb] to [5d97a5aa96].

    21     21   CFLAGS       := -I${NACL_SDK_ROOT}/include
    22     22   CXXFLAGS     := $(CFLAGS)
    23     23   CPPFLAGS     := $(CFLAGS)
    24     24   export CFLAGS CXXFLAGS CPPFLAGS
    25     25   
    26     26   all: libpcsc.a
    27     27   
    28         -libpcsc.a: pcsc/Makefile pcsc/pcsc-nacl.h pcsc/pcsc_nacl_init.cc $(shell find pcsc/src -type f)
    29         -	$(MAKE) -C pcsc
           28  +libpcsc.a: pcsc/Makefile pcsc/pcsc-nacl.h pcsc/pcsc_nacl_init.cc $(shell find pcsc/src -type f) boost
           29  +	$(MAKE) -C pcsc BOOST_DIR='$(shell pwd)/boost'
    30     30   	cp pcsc/libpcsc.a libpcsc.a.new
    31     31   	mv libpcsc.a.new libpcsc.a
    32     32   
    33     33   boost: build-boost
    34     34   	rm -rf boost
    35     35   	./build-boost
    36     36   
    37     37   clean:
    38     38   	$(MAKE) -C pcsc clean
    39     39   	rm -f libpcsc.a
    40     40   	rm -f libpcsc.a.new
           41  +	rm -rf workdir-*
           42  +	rm -rf boost.new
    41     43   
    42     44   distclean: clean
    43     45   	rm -rf boost
    44     46   	$(MAKE) -C pcsc distclean
    45     47   
    46     48   mrproper: distclean
    47     49   	rm -rf pcsc/src
    48     50   
    49     51   .PHONY: all

Modified build/assemble-source-from-google.sh from [0f3dced8de] to [e4d6006867].

    38     38   
    39     39   		# Copy out JavaScript files for later use
    40     40   		mkdir "${instdir}/js" || exit 1
    41     41   #		cp common-utils/*.js "${instdir}/js" || exit 1
    42     42   #		cp third_party/pcsc-lite/client-side/*.js "${instdir}/js" || exit 1
    43     43   
    44     44   		# Assemble all the files into a single tree
    45         -		for file in logging.h scard_structs_serialization.h dom_requests_manager.h thread_safe_string_pool.h \
    46         -		    pp_var_utils.cc pp_var_utils.h scard_structs_serialization.cc dom_requests_manager.cc logging.cc; do
    47         -			find . -type f -name "${file}" -exec cp '{}' "${instdir}" ';'
           45  +		files=(
           46  +			common/cpp/src/google_smart_card_common/formatting.h
           47  +			common/cpp/src/google_smart_card_common/logging/function_call_tracer.cc
           48  +			common/cpp/src/google_smart_card_common/logging/function_call_tracer.h
           49  +			common/cpp/src/google_smart_card_common/logging/hex_dumping.cc
           50  +			common/cpp/src/google_smart_card_common/logging/hex_dumping.h
           51  +			common/cpp/src/google_smart_card_common/logging/logging.cc
           52  +			common/cpp/src/google_smart_card_common/logging/logging.h
           53  +			common/cpp/src/google_smart_card_common/logging/mask_dumping.h
           54  +			common/cpp/src/google_smart_card_common/messaging/message_listener.h
           55  +			common/cpp/src/google_smart_card_common/messaging/typed_message.cc
           56  +			common/cpp/src/google_smart_card_common/messaging/typed_message.h
           57  +			common/cpp/src/google_smart_card_common/messaging/typed_message_listener.h
           58  +			common/cpp/src/google_smart_card_common/messaging/typed_message_router.cc
           59  +			common/cpp/src/google_smart_card_common/messaging/typed_message_router.h
           60  +			common/cpp/src/google_smart_card_common/multi_string.cc
           61  +			common/cpp/src/google_smart_card_common/multi_string.h
           62  +			common/cpp/src/google_smart_card_common/numeric_conversions.cc
           63  +			common/cpp/src/google_smart_card_common/numeric_conversions.h
           64  +			common/cpp/src/google_smart_card_common/optional.h
           65  +			common/cpp/src/google_smart_card_common/pp_var_utils/construction.cc
           66  +			common/cpp/src/google_smart_card_common/pp_var_utils/construction.h
           67  +			common/cpp/src/google_smart_card_common/pp_var_utils/copying.cc
           68  +			common/cpp/src/google_smart_card_common/pp_var_utils/copying.h
           69  +			common/cpp/src/google_smart_card_common/pp_var_utils/debug_dump.cc
           70  +			common/cpp/src/google_smart_card_common/pp_var_utils/debug_dump.h
           71  +			common/cpp/src/google_smart_card_common/pp_var_utils/extraction.cc
           72  +			common/cpp/src/google_smart_card_common/pp_var_utils/extraction.h
           73  +			common/cpp/src/google_smart_card_common/pp_var_utils/operations.h
           74  +			common/cpp/src/google_smart_card_common/pp_var_utils/struct_converter.h
           75  +			common/cpp/src/google_smart_card_common/requesting/async_request.cc
           76  +			common/cpp/src/google_smart_card_common/requesting/async_request.h
           77  +			common/cpp/src/google_smart_card_common/requesting/async_requests_storage.cc
           78  +			common/cpp/src/google_smart_card_common/requesting/async_requests_storage.h
           79  +			common/cpp/src/google_smart_card_common/requesting/js_requester.cc
           80  +			common/cpp/src/google_smart_card_common/requesting/js_requester.h
           81  +			common/cpp/src/google_smart_card_common/requesting/remote_call_adaptor.cc
           82  +			common/cpp/src/google_smart_card_common/requesting/remote_call_adaptor.h
           83  +			common/cpp/src/google_smart_card_common/requesting/remote_call_message.cc
           84  +			common/cpp/src/google_smart_card_common/requesting/remote_call_message.h
           85  +			common/cpp/src/google_smart_card_common/requesting/request_id.h
           86  +			common/cpp/src/google_smart_card_common/requesting/request_result.cc
           87  +			common/cpp/src/google_smart_card_common/requesting/request_result.h
           88  +			common/cpp/src/google_smart_card_common/requesting/requester.cc
           89  +			common/cpp/src/google_smart_card_common/requesting/requester.h
           90  +			common/cpp/src/google_smart_card_common/requesting/requester_message.cc
           91  +			common/cpp/src/google_smart_card_common/requesting/requester_message.h
           92  +			common/cpp/src/google_smart_card_common/thread_safe_unique_ptr.h
           93  +			common/cpp/src/google_smart_card_common/unique_ptr_utils.h
           94  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite.h
           95  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite_tracing_wrapper.cc
           96  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/pcsc_lite_tracing_wrapper.h
           97  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_debug_dump.cc
           98  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_debug_dump.h
           99  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_structs_serialization.cc
          100  +			third_party/pcsc-lite/naclport/common/src/google_smart_card_pcsc_lite_common/scard_structs_serialization.h
          101  +			third_party/pcsc-lite/naclport/cpp_client/src/google_smart_card_pcsc_lite_client/global.cc
          102  +			third_party/pcsc-lite/naclport/cpp_client/src/google_smart_card_pcsc_lite_client/global.h
          103  +			third_party/pcsc-lite/naclport/cpp_client/src/pcsc_lite_over_requester.cc
          104  +			third_party/pcsc-lite/naclport/cpp_client/src/pcsc_lite_over_requester.h
          105  +			third_party/pcsc-lite/src-1.8.15/src/error.c
          106  +		)
          107  +
          108  +		for file in "${files[@]}"; do
          109  +			instfile="${instdir}/$(basename "${file}")"
          110  +
          111  +			sed 's@<google_smart_card_pcsc_lite_client/*.*/@<@;s@<google_smart_card_common/*.*/@<@;s@<google_smart_card_pcsc_lite_common/*.*/@<@;/#include "config.h"/ d;s@#include "misc.h"@#include "winscard.h"@' "${file}" > "${instfile}" || exit 1
    48    112   		done
          113  +
    49    114   	) || return 1
    50    115   
    51    116   	rm -rf "${workdir}"
    52    117   
    53    118   	return 0
    54    119   }
    55    120   

Modified pcsc/Makefile from [db5548a6ca] to [9eb3eea2a6].

     1         -CFLAGS   += -Wall -std=gnu++11 -g3 -ggdb3
     2         -CXXFLAGS += -Wall -std=gnu++11 -g3 -ggdb3
     3         -CPPFLAGS += -I../src/src/PCSC
            1  +BOOST_DIR := /usr/include/boost
            2  +CFLAGS    += -Wall -std=gnu11 -g3 -ggdb3
            3  +CXXFLAGS  += -Wall -std=gnu++11 -g3 -ggdb3
            4  +CPPFLAGS  += -Isrc/include/PCSC -isystem $(BOOST_DIR)/include -Isrc -isystem $(NACL_SDK_ROOT)/include
     4      5   
     5         -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
            6  +OBJS += 
            7  +# pcsc_nacl_init.o
     6      8   
     7      9   all: libpcsc.a
           10  +
           11  +include Makefile.deps
     8     12   
     9     13   libpcsc.a: $(OBJS)
    10     14   	rm -f libpcsc.a
    11     15   	$(AR) rc libpcsc.a $(OBJS)
    12     16   	-$(RANLIB) libpcsc.a
    13     17   
    14         -pcsc_nacl_init.o: pcsc_nacl_init.cc pcsc_nacl_global.h dom_requests_manager.h pcsc_nacl.h
           18  +%.o: src/%.cc
           19  +	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o "$@" $(filter %.cc,$^)
    15     20   
    16         -pcsc_nacl.o: pcsc_nacl.cc pcsc_nacl.h logging.h pp_var_utils.h scard_structs_serialization.h
    17         -pcsc_nacl.h: dom_requests_manager.h thread_safe_string_pool.h
    18         -
    19         -pcsc_nacl_global.o: pcsc_nacl_global.cc pcsc_nacl_global.h logging.h
    20         -pcsc_nacl_global.h: pcsc_nacl.h
           21  +%.o: src/%.c
           22  +	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o "$@" $(filter %.c,$^)
    21     23   
    22         -pp_var_utils.o: pp_var_utils.cc pp_var_utils.h logging.h
    23         -pp_var_utils.h: logging.h
    24         -
    25         -scard_structs_serialization.o: scard_structs_serialization.cc scard_structs_serialization.h pp_var_utils.h
    26         -scard_structs_serialization.h: pp_var_utils.h
    27         -
    28         -dom_requests_manager.o: dom_requests_manager.cc dom_requests_manager.h logging.h pp_var_utils.h
    29         -
    30         -logging.o: logging.cc logging.h
           24  +Makefile.deps:
           25  +	rm -f Makefile.deps.new
           26  +	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM src/*.cc > Makefile.deps.new
           27  +	$(CC) $(CFLAGS) $(CPPFLAGS) -MM src/*.c >> Makefile.deps.new
           28  +	grep ': ' Makefile.deps.new | cut -f 1 -d : | sed 's@^@OBJS += @' >> Makefile.deps.new
           29  +	mv Makefile.deps.new Makefile.deps
    31     30   
    32     31   clean:
    33     32   	rm -f $(OBJS)
    34     33   	rm -f libpcsc.a
           34  +	rm -f Makefile.deps.new
    35     35   
    36     36   distclean: clean
           37  +	rm -f Makefile.deps
    37     38   
    38     39   .PHONY: all clean distclean