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

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

Issue 29557565: Issue 5800 - Add option to specify a list of V8 libraries (Closed)
Patch Set: moved 'packagingOptions' section to dynamic linking 'if' branch only Created Nov. 2, 2017, 11:30 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 LOCAL_PATH := $(call my-dir) 1 LOCAL_PATH := $(call my-dir)
2 2
3 # Report configuration
4 ifeq ($(SHARED_V8_LIB_FILENAMES),)
5 # static
6 $(info [Configuration] Linking statically with built-in v8)
7 else
8 # dynamic
9
10 define info_define
11 $(info [Configuration] Linking dynamically with shared v8 library ./libadblo ckplus-binaries/android_$(TARGET_ARCH_ABI)/$1)
12 endef
13 $(foreach item,$(SHARED_V8_LIB_FILENAMES),$(eval $(call info_define,$(item))))
14 endif
15
16 # libadblockplus.a
3 include $(CLEAR_VARS) 17 include $(CLEAR_VARS)
4 18
5 LOCAL_MODULE := libadblockplus 19 LOCAL_MODULE := libadblockplus
6 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libadblo ckplus.a 20 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libadblo ckplus.a
7 21
8 include $(PREBUILT_STATIC_LIBRARY) 22 include $(PREBUILT_STATIC_LIBRARY)
9 23
24 # libv8-platform.a
25 include $(CLEAR_VARS)
26
27 LOCAL_MODULE := v8-libplatform
28 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bplatform.a
29
30 include $(PREBUILT_STATIC_LIBRARY)
31
32 ifeq ($(SHARED_V8_LIB_FILENAMES),)
33 # static
34
35 # libv8-libsampler.a
10 include $(CLEAR_VARS) 36 include $(CLEAR_VARS)
11 37
12 LOCAL_MODULE := v8-libsampler 38 LOCAL_MODULE := v8-libsampler
13 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bsampler.a 39 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bsampler.a
14 40
15 include $(PREBUILT_STATIC_LIBRARY) 41 include $(PREBUILT_STATIC_LIBRARY)
16 42
43 # libv8-base.a
17 include $(CLEAR_VARS) 44 include $(CLEAR_VARS)
18 45
19 LOCAL_MODULE := v8-base 46 LOCAL_MODULE := v8-base
20 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_ba se.a 47 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_ba se.a
21 48
22 include $(PREBUILT_STATIC_LIBRARY) 49 include $(PREBUILT_STATIC_LIBRARY)
23 50
51 # libv8_libbase.a
24 include $(CLEAR_VARS) 52 include $(CLEAR_VARS)
25 53
26 LOCAL_MODULE := v8-libbase 54 LOCAL_MODULE := v8-libbase
27 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bbase.a 55 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bbase.a
28 56
29 include $(PREBUILT_STATIC_LIBRARY) 57 include $(PREBUILT_STATIC_LIBRARY)
30 58
31 include $(CLEAR_VARS) 59 # libv8_snapshot.a
32
33 LOCAL_MODULE := v8-libplatform
34 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_li bplatform.a
35
36 include $(PREBUILT_STATIC_LIBRARY)
37
38 include $(CLEAR_VARS) 60 include $(CLEAR_VARS)
39 61
40 LOCAL_MODULE := v8-snapshot 62 LOCAL_MODULE := v8-snapshot
41 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_sn apshot.a 63 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/libv8_sn apshot.a
42 64
43 include $(PREBUILT_STATIC_LIBRARY) 65 include $(PREBUILT_STATIC_LIBRARY)
44 66
67 else
68 # dynamic
69
70 # prebuilt shared libraries v8
71
72 define libv8_define
73 include $(CLEAR_VARS)
74
75 LOCAL_MODULE := $1
76 LOCAL_SRC_FILES := ./libadblockplus-binaries/android_$(TARGET_ARCH_ABI)/$1
77
78 include $(PREBUILT_SHARED_LIBRARY)
79 endef
80 $(foreach item,$(SHARED_V8_LIB_FILENAMES),$(eval $(call libv8_define,$(item))))
81
82 endif
83
45 include $(CLEAR_VARS) 84 include $(CLEAR_VARS)
46 85
47 LOCAL_MODULE := libadblockplus-jni 86 LOCAL_MODULE := libadblockplus-jni
48 LOCAL_SRC_FILES := JniLibrary.cpp 87 LOCAL_SRC_FILES := JniLibrary.cpp
49 LOCAL_SRC_FILES += JniPlatform.cpp 88 LOCAL_SRC_FILES += JniPlatform.cpp
50 LOCAL_SRC_FILES += JniJsEngine.cpp JniFilterEngine.cpp JniJsValue.cpp 89 LOCAL_SRC_FILES += JniJsEngine.cpp JniFilterEngine.cpp JniJsValue.cpp
51 LOCAL_SRC_FILES += JniFilter.cpp JniSubscription.cpp JniEventCallback.cpp 90 LOCAL_SRC_FILES += JniFilter.cpp JniSubscription.cpp JniEventCallback.cpp
52 LOCAL_SRC_FILES += JniLogSystem.cpp JniWebRequest.cpp 91 LOCAL_SRC_FILES += JniLogSystem.cpp JniWebRequest.cpp
53 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp 92 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp
54 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp 93 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp
55 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp 94 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp
56 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp 95 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp
57 96
58 LOCAL_CPP_FEATURES := exceptions 97 LOCAL_CPP_FEATURES := exceptions
59 LOCAL_CPPFLAGS += -std=c++11 98 LOCAL_CPPFLAGS += -std=c++11
60 99
61 LOCAL_C_INCLUDES := jni/libadblockplus-binaries/include/ 100 LOCAL_C_INCLUDES := jni/libadblockplus-binaries/include/
62 LOCAL_STATIC_LIBRARIES := libadblockplus v8-base v8-snapshot v8-libsampler v8-li bplatform v8-libbase 101
102 LOCAL_STATIC_LIBRARIES := libadblockplus v8-libplatform
103
104 ifeq ($(SHARED_V8_LIB_FILENAMES),)
105 # static
106 LOCAL_STATIC_LIBRARIES += v8-base v8-snapshot v8-libsampler v8-libbase
107 else
108 # dynamic
109 LOCAL_STATIC_LIBRARIES += $(SHARED_V8_LIB_FILENAMES)
110 endif
63 111
64 include $(BUILD_SHARED_LIBRARY) 112 include $(BUILD_SHARED_LIBRARY)
OLDNEW
« libadblockplus-android/build.gradle ('K') | « libadblockplus-android/build.gradle ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld