Index: build/chrome/Makefile ================================================================== --- build/chrome/Makefile +++ build/chrome/Makefile @@ -8,10 +8,17 @@ PCSC_LIBS = -Llib -lpcsc -L${NACL_SDK_ROOT}/lib/pnacl/Release -lppapi -lppapi_cpp LIBS = $(CACKEY_LIBS) $(PCSC_LIBS) CFLAGS = -Wall -g3 -ggdb3 -I${NACL_SDK_ROOT}/include -I../../pkcs11 -Iinclude/PCSC CXXFLAGS = $(CFLAGS) -std=gnu++11 LDFLAGS = -g3 -ggdb3 + +CACKEY_DEBUG = 0 +ifeq (1,$(CACKEY_DEBUG)) +CACKEY_LIBNAME = libcackey_g +else +CACKEY_LIBNAME = libcackey +endif PATH += :${NACL_SDK_ROOT}/toolchain/linux_pnacl/bin export PATH ifeq (,${NACL_SDK_ROOT}) @@ -38,11 +45,11 @@ lib/libcackey.a: build-deps mkdir -p lib rm -f lib/libcackey.a rm -rf workdir-* +./build-deps - cd lib && ln -s ../workdir-*.inst/lib/libcackey_g.a libcackey.a + cd lib && ln -s ../workdir-*.inst/lib/$(CACKEY_LIBNAME).a libcackey.a touch lib/libcackey.a lib/libpcsc.a: lib/libcackey.a mkdir -p lib rm -f lib/libpcsc.a @@ -55,11 +62,13 @@ cd lib && ln -s ../workdir-*.inst/lib/libz.a . touch lib/libz.a google-pcsc.js: lib/libcackey.a rm -f google-pcsc.js google-pcsc.js.new - cat workdir-*.inst/js/{scope,logging,pcsc,pcsc-nacl}.js > google-pcsc.js.new + cat workdir-*.inst/js/scope.js > google-pcsc.js.new + echo 'GoogleSmartCard.IS_DEBUG_BUILD = $(CACKEY_DEBUG);' >> google-pcsc.js.new + cat workdir-*.inst/js/{logging,pcsc,pcsc-nacl}.js >> google-pcsc.js.new mv google-pcsc.js.new google-pcsc.js include/PCSC/pcsc-nacl.h: lib/libcackey.a mkdir -p include/PCSC rm -f include/PCSC/pcsc-nacl.h.new include/PCSC/pcsc-nacl.h