Check-in [d4dfc708fb]
Overview
Comment:ChromeOS: Added support for building a debugging-enabled Chrome extension
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4dfc708fb97fd650bd83ec95772c0f51536eec8
User & Date: rkeene on 2016-02-19 14:27:55
Other Links: manifest | tags
Context
2016-02-19
14:29
ChromeOS: Ignore debugging binaries check-in: a779f950ca user: rkeene tags: trunk
14:27
ChromeOS: Added support for building a debugging-enabled Chrome extension check-in: d4dfc708fb user: rkeene tags: trunk
14:11
ChromeOS: Added the start of a UI check-in: e5e8b9f32b user: rkeene tags: trunk
Changes

Modified build/chrome/Makefile from [1d85794fd7] to [a0a70506fb].

9
10
11
12
13
14
15
16


17
18


19
20
21
22
23
24
25
26
27
28
29
30
31

32
33
34
35
36
37






38
39
40
41
42


43
44
45
46
47
48
49
9
10
11
12
13
14
15

16
17
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32

33
34
35
36
37


38
39
40
41
42
43
44
45
46


47
48
49
50
51
52
53
54
55







-
+
+

-
+
+












-
+




-
-
+
+
+
+
+
+



-
-
+
+







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
CACKEY_LIBNAME     = libcackey_g
CACKEY_EXECUTABLES = cackey.pexe cackey.bc
else
CACKEY_LIBNAME = libcackey
CACKEY_LIBNAME     = libcackey
CACKEY_EXECUTABLES = cackey.pexe
endif

PATH += :${NACL_SDK_ROOT}/toolchain/linux_pnacl/bin
export PATH

ifeq (,${NACL_SDK_ROOT})
$(error "Please set NACL_SDK_ROOT")
endif
export NACL_SDK_ROOT

all: cackey.crx

cackey.crx: cackey.pexe cackey.nmf manifest.json cackey.js google-pcsc.js pin.html pin.js pin-icon.png
cackey.crx: $(CACKEY_EXECUTABLES) cackey.nmf manifest.json cackey.js google-pcsc.js pin.html pin.js pin-icon.png
	rm -f cackey.crx
	zip cackey.crx.new $^
	mv cackey.crx.new cackey.crx

cackey.pexe: cackey-chrome.o cackey-chrome-init.o lib/libcackey.a lib/libpcsc.a lib/libz.a
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cackey.pexe.new cackey-chrome.o cackey-chrome-init.o $(LIBS)
cackey.bc: cackey-chrome.o cackey-chrome-init.o lib/libcackey.a lib/libpcsc.a lib/libz.a
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cackey.bc.new cackey-chrome.o cackey-chrome-init.o $(LIBS)
	mv cackey.bc.new cackey.bc

cackey.pexe: cackey.bc
	cp cackey.bc cackey.pexe.new
	$(FINALIZE) cackey.pexe.new
	mv cackey.pexe.new cackey.pexe

cackey.nmf: cackey.pexe
	${NACL_SDK_ROOT}/tools/create_nmf.py cackey.pexe > cackey.nmf.new
cackey.nmf: $(CACKEY_EXECUTABLES)
	${NACL_SDK_ROOT}/tools/create_nmf.py $(CACKEY_EXECUTABLES) > cackey.nmf.new
	mv cackey.nmf.new cackey.nmf

lib/libcackey.a: build-deps
	mkdir -p lib
	rm -f lib/libcackey.a
	rm -rf workdir-*
	+./build-deps
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94
95
96
97
98
99
100
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106







-
+













	gcc -g3 -ggdb3 -Wall -I. -I../../pkcs11 -I/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/include -I/opt/appfs/rkeene.org/pcsc-lite/platform/latest/include/PCSC -DHAVE_WINTYPES_H=1 -DHAVE_PCSCLITE_H=1 -DHAVE_WINSCARD_H=1 -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_PTHREAD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDIO_H=1 -DHAVE_ZLIB_H -DHAVE_LIBZ -DCACKEY_DEBUG=1 -o test cackey-chrome.c cackey-chrome-test.c ../../cackey.c -L/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -lz -L/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -lpcsclite -L/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -lc -lpthread -Wl,-R,/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -Wl,-R,/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -Wl,-R,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -Wl,-dynamic-linker,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib/ld-linux-x86-64.so.2

cackey-chrome.o: cackey-chrome.c cackey-chrome.h
cackey-chrome-init.o: cackey-chrome-init.cc cackey-chrome.h include/PCSC/pcsc-nacl.h

clean:
	rm -f cackey-chrome.o cackey-chrome-init.o
	rm -f cackey.pexe
	rm -f cackey.pexe cackey.bc
	rm -f cackey.crx cackey.nmf
	rm -f test

distclean: clean
	rm -f lib/libcackey.a lib/libpcsc.a lib/libz.a
	-rmdir lib
	rm -f include/PCSC/pcsc-nacl.h
	-rmdir include/PCSC
	-rmdir include
	rm -f google-pcsc.js
	rm -rf workdir-*

.PHONY: all clean distclean