1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
+
+
+
+
+
+
+
|
CC = pnacl-clang
CXX = pnacl-clang++
AR = pnacl-ar
RANLIB = pnacl-ranlib
FINALIZE = pnacl-finalize
CACKEY_LIBS = -Llib -lcackey -lz
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})
$(error "Please set NACL_SDK_ROOT")
endif
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
-
+
+
+
-
+
|
mv cackey.nmf.new cackey.nmf
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
cd lib && ln -s ../workdir-*.inst/lib/libpcsc.a .
touch lib/libpcsc.a
lib/libz.a: lib/libcackey.a
mkdir -p lib
rm -f lib/libz.a
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.js > google-pcsc.js.new
echo 'GoogleSmartCard.IS_DEBUG_BUILD = $(CACKEY_DEBUG);' >> google-pcsc.js.new
cat workdir-*.inst/js/{scope,logging,pcsc,pcsc-nacl}.js > 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
cd include/PCSC && ln -s ../../workdir-*.inst/include/PCSC/pcsc-nacl.h pcsc-nacl.h.new
touch include/PCSC/pcsc-nacl.h.new
|