LEFT | RIGHT |
1 LOCAL_PATH := $(call my-dir) | 1 LOCAL_PATH := $(call my-dir) |
2 | 2 |
3 # Use cases: | 3 # Use cases: |
4 # ---------- | 4 # ---------- |
5 # V8 - static/dynamic | 5 # V8 - static/dynamic |
6 # headers: V8_INCLUDE_DIR | 6 # headers: V8_INCLUDE_DIR |
7 # binaries: | 7 # binaries: |
8 # static: STATIC_V8_LIB_DIR (libv8_monolith.a) | 8 # static: STATIC_V8_LIB_DIR (libv8_monolith.a) |
9 # dynamic: SHARED_V8_LIB_DIR (libv8.cr.so, libv8_libbase.cr.so) | 9 # dynamic: SHARED_V8_LIB_DIR (libv8.cr.so, libv8_libbase.cr.so) |
10 # libadblockplus - static | 10 # libadblockplus - static |
11 # headers: LIBABP_INCLUDE_DIR | 11 # headers: LIBABP_INCLUDE_DIR |
12 # binaries: | 12 # binaries: |
13 # LIBABP_LIB_DIR (libadblockplus.a) | 13 # LIBABP_LIB_DIR (libadblockplus.a) |
14 | 14 |
15 # libadblockplus | 15 # libadblockplus |
16 # --- | 16 # --- |
17 | 17 |
18 # headers | 18 # headers |
19 | 19 |
20 # default | 20 # default |
21 ifeq ($(LIBABP_INCLUDE_DIR),) | 21 ifeq ($(LIBABP_INCLUDE_DIR),) |
22 LIBABP_INCLUDE_DIR := $(PWD)/../libadblockplus/include | 22 LIBABP_INCLUDE_DIR := $(PWD)/../libadblockplus/include |
23 $(info [Configuration] Pass LIBABP_INCLUDE_DIR to set libadblockplus headers d
irectory, using default value.) | 23 $(info [Configuration] Pass LIBABP_INCLUDE_DIR to set libadblockplus headers d
irectory, using default value.) |
24 endif | 24 endif |
25 | 25 |
26 $(info [Configuration] Using libadblockplus headers directory $(LIBABP_INCLUDE_D
IR)) | 26 $(info [Configuration] Using libadblockplus headers directory $(LIBABP_INCLUDE_D
IR)) |
27 GLOBAL_C_INCLUDES := $(LIBABP_INCLUDE_DIR) | 27 TMP_C_INCLUDES := $(LIBABP_INCLUDE_DIR) |
28 | 28 |
29 # binaries | 29 # binaries |
30 | 30 |
31 ifeq ($(LIBABP_LIB_DIR),) | 31 ifeq ($(LIBABP_LIB_DIR),) |
32 LIBABP_LIB_DIR := $(PWD)/../libadblockplus/build/local/$(TARGET_ARCH_ABI) | 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.) | 33 $(info [Configuration] Pass LIBABP_LIB_DIR to set static libadblockplus librar
y directory, using default value.) |
34 endif | 34 endif |
35 | 35 |
36 $(info [Configuration] Using static libadblockplus library $(LIBABP_LIB_DIR)/lib
adblockplus.a) | 36 $(info [Configuration] Using static libadblockplus library $(LIBABP_LIB_DIR)/lib
adblockplus.a) |
37 | 37 |
38 include $(CLEAR_VARS) | 38 include $(CLEAR_VARS) |
39 LOCAL_MODULE := libadblockplus | 39 LOCAL_MODULE := libadblockplus |
40 LOCAL_SRC_FILES := $(LIBABP_LIB_DIR)/libadblockplus.a | 40 LOCAL_SRC_FILES := $(LIBABP_LIB_DIR)/libadblockplus.a |
41 include $(PREBUILT_STATIC_LIBRARY) | 41 include $(PREBUILT_STATIC_LIBRARY) |
42 TMP_LIBRARIES += libadblockplus | 42 TMP_LIBRARIES += libadblockplus |
43 # --- | 43 # --- |
44 | 44 |
45 # V8 | 45 # V8 |
46 # --- | 46 # --- |
47 | 47 |
48 # headers | 48 # headers |
49 | 49 |
50 # default | 50 # default |
51 ifeq ($(V8_INCLUDE_DIR),) | 51 ifeq ($(V8_INCLUDE_DIR),) |
52 V8_INCLUDE_DIR := $(PWD)/../libadblockplus/third_party/prebuilt-v8/include | 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.) | 53 $(info [Configuration] Pass V8_INCLUDE_DIR to set V8 headers directory, using
default value.) |
54 endif | 54 endif |
55 | 55 |
56 $(info [Configuration] Using V8 headers directory $(V8_INCLUDE_DIR)) | 56 $(info [Configuration] Using V8 headers directory $(V8_INCLUDE_DIR)) |
57 GLOBAL_C_INCLUDES += $(V8_INCLUDE_DIR) | 57 TMP_C_INCLUDES += $(V8_INCLUDE_DIR) |
58 | 58 |
59 # binaries | 59 # binaries |
60 ifeq ($(SHARED_V8_LIB_DIR),) | 60 ifeq ($(SHARED_V8_LIB_DIR),) |
61 | 61 |
62 # default | 62 # default |
63 ifeq ($(STATIC_V8_LIB_DIR),) | 63 ifeq ($(STATIC_V8_LIB_DIR),) |
64 STATIC_V8_LIB_DIR := $(PWD)/../libadblockplus/third_party/prebuilt-v8 | 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.) | 65 $(info [Configuration] Pass STATIC_V8_LIB_DIR to set static V8 libraries dir
ectory, using default value.) |
66 endif | 66 endif |
67 | 67 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp | 99 LOCAL_SRC_FILES += JniUpdateAvailableCallback.cpp JniUpdateCheckDoneCallback.cpp |
100 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp | 100 LOCAL_SRC_FILES += JniFilterChangeCallback.cpp JniCallbacks.cpp Utils.cpp |
101 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp | 101 LOCAL_SRC_FILES += JniNotification.cpp JniShowNotificationCallback.cpp |
102 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp | 102 LOCAL_SRC_FILES += JniIsAllowedConnectionTypeCallback.cpp |
103 | 103 |
104 LOCAL_CPP_FEATURES := exceptions | 104 LOCAL_CPP_FEATURES := exceptions |
105 | 105 |
106 LOCAL_LDFLAGS += -Wl,--allow-multiple-definition | 106 LOCAL_LDFLAGS += -Wl,--allow-multiple-definition |
107 LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true | 107 LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true |
108 | 108 |
| 109 # TMP_ variables are used to collect include paths for LOCAL_C_INCLUDES |
| 110 # and libs for LOCAL_STATIC_LIBRARIES because `include $(CLEAR_VARS)` clears the
m otherwise |
| 111 LOCAL_C_INCLUDES := $(TMP_C_INCLUDES) |
109 LOCAL_STATIC_LIBRARIES := $(TMP_LIBRARIES) | 112 LOCAL_STATIC_LIBRARIES := $(TMP_LIBRARIES) |
110 LOCAL_C_INCLUDES := $(GLOBAL_C_INCLUDES) | |
111 | 113 |
112 include $(BUILD_SHARED_LIBRARY) | 114 include $(BUILD_SHARED_LIBRARY) |
LEFT | RIGHT |