Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: libadblockplus-android/jni/Android.mk

Issue 29810565: Issue 6750 - Update libadblockplus dependency to revision hg:70579fb48a6c (Closed)
Patch Set: Updated revisions, README Created June 21, 2018, 1:34 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dependencies ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 LOCAL_PATH := $(call my-dir) 1 LOCAL_PATH := $(call my-dir)
2 2
3 # SHARED_V8_LIB_DIR is expected to be full absolute path if set by user 3 # Use cases:
4 ifeq ($(SHARED_V8_LIB_DIR),) 4 # ----------
5 # default 5 # V8 - static/dynamic
6 SHARED_V8_LIB_DIR := ./libadblockplus-binaries 6 # headers: V8_INCLUDE_DIR
7 SHARED_V8_INCLUDE_DIR := jni/libadblockplus-binaries/include/ 7 # binaries:
8 else 8 # static: STATIC_V8_LIB_DIR (libv8_monolith.a)
9 # set by user 9 # dynamic: SHARED_V8_LIB_DIR (libv8.cr.so, libv8_libbase.cr.so)
10 $(info [Configuration] Using shared v8 libraries directory $(SHARED_V8_LIB_DIR )) 10 # libadblockplus - static
11 SHARED_V8_INCLUDE_DIR := $(SHARED_V8_LIB_DIR)/include/ 11 # headers: LIBABP_INCLUDE_DIR
12 # binaries:
13 # LIBABP_LIB_DIR (libadblockplus.a)
14
15 # libadblockplus
16 # ---
17
18 # headers
19
20 # default
21 ifeq ($(LIBABP_INCLUDE_DIR),)
22 LIBABP_INCLUDE_DIR := $(PWD)/../libadblockplus/include
23 $(info [Configuration] Pass LIBABP_INCLUDE_DIR to set libadblockplus headers d irectory, using default value.)
12 endif 24 endif
13 25
14 # Report configuration 26 $(info [Configuration] Using libadblockplus headers directory $(LIBABP_INCLUDE_D IR))
15 ifeq ($(SHARED_V8_LIB_FILENAMES),) 27 TMP_C_INCLUDES := $(LIBABP_INCLUDE_DIR)
16 # static
17 $(info [Configuration] Linking statically with built-in v8)
18 else
19 # dynamic
20 28
21 define info_define 29 # binaries
22 $(info [Configuration] Linking dynamically with shared v8 library $(SHARED_V 8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/$1) 30
23 endef 31 ifeq ($(LIBABP_LIB_DIR),)
24 $(foreach item,$(SHARED_V8_LIB_FILENAMES),$(eval $(call info_define,$(item)))) 32 LIBABP_LIB_DIR := $(PWD)/../libadblockplus/build/local/$(TARGET_ARCH_ABI)
33 $(info [Configuration] Pass LIBABP_LIB_DIR to set static libadblockplus librar y directory, using default value.)
25 endif 34 endif
26 35
27 # libadblockplus.a 36 $(info [Configuration] Using static libadblockplus library $(LIBABP_LIB_DIR)/lib adblockplus.a)
37
28 include $(CLEAR_VARS) 38 include $(CLEAR_VARS)
39 LOCAL_MODULE := libadblockplus
40 LOCAL_SRC_FILES := $(LIBABP_LIB_DIR)/libadblockplus.a
41 include $(PREBUILT_STATIC_LIBRARY)
42 TMP_LIBRARIES += libadblockplus
43 # ---
29 44
30 LOCAL_MODULE := libadblockplus 45 # V8
31 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libadblockplu s.a 46 # ---
32 47
33 include $(PREBUILT_STATIC_LIBRARY) 48 # headers
34 49
35 # libv8-platform.a 50 # default
36 include $(CLEAR_VARS) 51 ifeq ($(V8_INCLUDE_DIR),)
52 V8_INCLUDE_DIR := $(PWD)/../libadblockplus/third_party/prebuilt-v8/include
53 $(info [Configuration] Pass V8_INCLUDE_DIR to set V8 headers directory, using default value.)
54 endif
37 55
38 LOCAL_MODULE := v8-libplatform 56 $(info [Configuration] Using V8 headers directory $(V8_INCLUDE_DIR))
39 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libv8_libplat form.a 57 TMP_C_INCLUDES += $(V8_INCLUDE_DIR)
40 58
41 include $(PREBUILT_STATIC_LIBRARY) 59 # binaries
60 ifeq ($(SHARED_V8_LIB_DIR),)
42 61
43 ifeq ($(SHARED_V8_LIB_FILENAMES),) 62 # default
44 # static 63 ifeq ($(STATIC_V8_LIB_DIR),)
64 STATIC_V8_LIB_DIR := $(PWD)/../libadblockplus/third_party/prebuilt-v8
65 $(info [Configuration] Pass STATIC_V8_LIB_DIR to set static V8 libraries dir ectory, using default value.)
66 endif
45 67
46 # libv8-libsampler.a 68 $(info [Configuration] Using static v8 library $(STATIC_V8_LIB_DIR)/libv8_mono lith.a)
47 include $(CLEAR_VARS)
48 69
49 LOCAL_MODULE := v8-libsampler 70 include $(CLEAR_VARS)
50 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libv8_libsamp ler.a 71 LOCAL_MODULE := libv8_monolith
51 72 LOCAL_SRC_FILES := $(STATIC_V8_LIB_DIR)/libv8_monolith.a
52 include $(PREBUILT_STATIC_LIBRARY) 73 include $(PREBUILT_STATIC_LIBRARY)
53 74 TMP_LIBRARIES += libv8_monolith
54 # libv8-base.a
55 include $(CLEAR_VARS)
56
57 LOCAL_MODULE := v8-base
58 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libv8_base.a
59
60 include $(PREBUILT_STATIC_LIBRARY)
61
62 # libv8_libbase.a
63 include $(CLEAR_VARS)
64
65 LOCAL_MODULE := v8-libbase
66 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libv8_libbase .a
67
68 include $(PREBUILT_STATIC_LIBRARY)
69
70 # libv8_snapshot.a
71 include $(CLEAR_VARS)
72
73 LOCAL_MODULE := v8-snapshot
74 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/libv8_snapsho t.a
75
76 include $(PREBUILT_STATIC_LIBRARY)
77 75
78 else 76 else
79 # dynamic
80 77
81 # prebuilt shared libraries v8 78 define libv8_define
82 79 include $(CLEAR_VARS)
83 define libv8_define 80 $(info [Configuration] Linking dynamically with shared v8 library $(SHARED _V8_LIB_DIR)/$1)
84 include $(CLEAR_VARS) 81 LOCAL_MODULE := $1
85 82 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/$1
86 LOCAL_MODULE := $1 83 include $(PREBUILT_SHARED_LIBRARY)
87 LOCAL_SRC_FILES := $(SHARED_V8_LIB_DIR)/android_$(TARGET_ARCH_ABI)/$1 84 TMP_LIBRARIES += $1
88 85 endef
89 include $(PREBUILT_SHARED_LIBRARY) 86 $(foreach item,$(SHARED_V8_LIB_FILENAMES),$(eval $(call libv8_define,$(item))) )
90 endef
91 $(foreach item,$(SHARED_V8_LIB_FILENAMES),$(eval $(call libv8_define,$(item))))
92 87
93 endif 88 endif
89 # ----
94 90
95 include $(CLEAR_VARS) 91 include $(CLEAR_VARS)
96 92
97 LOCAL_MODULE := libadblockplus-jni 93 LOCAL_MODULE := libadblockplus-jni
98 LOCAL_SRC_FILES := JniLibrary.cpp 94 LOCAL_SRC_FILES := JniLibrary.cpp
99 LOCAL_SRC_FILES += JniPlatform.cpp 95 LOCAL_SRC_FILES += JniPlatform.cpp
100 LOCAL_SRC_FILES += JniJsEngine.cpp JniFilterEngine.cpp JniJsValue.cpp 96 LOCAL_SRC_FILES += JniJsEngine.cpp JniFilterEngine.cpp JniJsValue.cpp
101 LOCAL_SRC_FILES += JniFilter.cpp JniSubscription.cpp JniEventCallback.cpp 97 LOCAL_SRC_FILES += JniFilter.cpp JniSubscription.cpp JniEventCallback.cpp
102 LOCAL_SRC_FILES += JniLogSystem.cpp JniWebRequest.cpp 98 LOCAL_SRC_FILES += JniLogSystem.cpp JniWebRequest.cpp
103 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp 99 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp
104 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp 100 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp
105 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp 101 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp
106 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp 102 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp
107 103
108 LOCAL_CPP_FEATURES := exceptions 104 LOCAL_CPP_FEATURES := exceptions
109 105
110 LOCAL_C_INCLUDES := $(SHARED_V8_INCLUDE_DIR)
111
112 LOCAL_LDFLAGS += -Wl,--allow-multiple-definition 106 LOCAL_LDFLAGS += -Wl,--allow-multiple-definition
113 LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true 107 LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true
114 108
115 LOCAL_STATIC_LIBRARIES := libadblockplus v8-libplatform 109 # TMP_ variables are used to collect include paths for LOCAL_C_INCLUDES
116 110 # and libs for LOCAL_STATIC_LIBRARIES because `include $(CLEAR_VARS)` clears the m otherwise
117 ifeq ($(SHARED_V8_LIB_FILENAMES),) 111 LOCAL_C_INCLUDES := $(TMP_C_INCLUDES)
118 # static 112 LOCAL_STATIC_LIBRARIES := $(TMP_LIBRARIES)
119 LOCAL_STATIC_LIBRARIES += v8-base v8-snapshot v8-libsampler v8-libbase
120 else
121 # dynamic
122 LOCAL_STATIC_LIBRARIES += $(SHARED_V8_LIB_FILENAMES)
123 endif
124 113
125 include $(BUILD_SHARED_LIBRARY) 114 include $(BUILD_SHARED_LIBRARY)
OLDNEW
« no previous file with comments | « dependencies ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld