Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 1 | # Copyright (C) 2015 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Jorge Lucangeli Obes | b845b15 | 2015-12-08 20:52:41 -0800 | [diff] [blame] | 17 | |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 18 | # Common variables. |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 19 | # ========================================================= |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 20 | libminijailSrcFiles := \ |
| 21 | bpf.c \ |
| 22 | libminijail.c \ |
| 23 | signal_handler.c \ |
| 24 | syscall_filter.c \ |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 25 | syscall_wrapper.c \ |
Jorge Lucangeli Obes | 0b20877 | 2017-04-19 14:15:46 -0400 | [diff] [blame] | 26 | system.c \ |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 27 | util.c |
| 28 | |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 29 | targetUnittestSrcFiles := \ |
| 30 | testrunner.cc |
| 31 | |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 32 | hostUnittestSrcFiles := \ |
| 33 | linux-x86/libconstants.gen.c \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 34 | linux-x86/libsyscalls.gen.c \ |
| 35 | testrunner.cc |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 36 | |
Jorge Lucangeli Obes | f783b52 | 2016-03-14 14:34:10 -0700 | [diff] [blame] | 37 | minijailCommonCFlags := -DHAVE_SECUREBITS_H -Wall -Werror |
Jorge Lucangeli Obes | 6fd82bd | 2015-12-15 09:28:52 -0800 | [diff] [blame] | 38 | minijailCommonLibraries := libcap |
Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 39 | |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 40 | |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 41 | # Static library for generated code. |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 42 | # ========================================================= |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 43 | include $(CLEAR_VARS) |
| 44 | LOCAL_MODULE := libminijail_generated |
Jiyong Park | 351d986 | 2017-04-18 23:51:27 +0900 | [diff] [blame] | 45 | include $(LOCAL_PATH)/gen.mk |
| 46 | include $(BUILD_STATIC_LIBRARY) |
Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 47 | |
Jiyong Park | 351d986 | 2017-04-18 23:51:27 +0900 | [diff] [blame] | 48 | include $(CLEAR_VARS) |
| 49 | LOCAL_MODULE:= libminijail_generated_vendor |
| 50 | include $(LOCAL_PATH)/gen.mk |
| 51 | LOCAL_VENDOR_MODULE := true |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 52 | include $(BUILD_STATIC_LIBRARY) |
| 53 | |
Jorge Lucangeli Obes | b845b15 | 2015-12-08 20:52:41 -0800 | [diff] [blame] | 54 | |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 55 | # libminijail shared library for target. |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 56 | # ========================================================= |
Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 57 | include $(CLEAR_VARS) |
| 58 | LOCAL_MODULE := libminijail |
| 59 | |
Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 60 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 61 | LOCAL_CLANG := true |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 62 | LOCAL_SRC_FILES := $(libminijailSrcFiles) |
Jorge Lucangeli Obes | 8b330bf | 2015-08-04 10:42:05 -0700 | [diff] [blame] | 63 | |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 64 | LOCAL_STATIC_LIBRARIES := libminijail_generated |
Jorge Lucangeli Obes | 6fd82bd | 2015-12-15 09:28:52 -0800 | [diff] [blame] | 65 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
Jorge Lucangeli Obes | 8b330bf | 2015-08-04 10:42:05 -0700 | [diff] [blame] | 66 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
Jorge Lucangeli Obes | a21c8fc | 2015-07-15 16:22:34 -0700 | [diff] [blame] | 67 | include $(BUILD_SHARED_LIBRARY) |
Jorge Lucangeli Obes | c37681d | 2015-10-28 10:41:39 -0700 | [diff] [blame] | 68 | |
Jiyong Park | 351d986 | 2017-04-18 23:51:27 +0900 | [diff] [blame] | 69 | include $(CLEAR_VARS) |
| 70 | LOCAL_MODULE := libminijail_vendor |
| 71 | |
| 72 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 73 | LOCAL_CLANG := true |
| 74 | LOCAL_SRC_FILES := $(libminijailSrcFiles) |
| 75 | LOCAL_VENDOR_MODULE := true |
| 76 | |
| 77 | LOCAL_STATIC_LIBRARIES := libminijail_generated_vendor |
| 78 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 79 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 80 | include $(BUILD_SHARED_LIBRARY) |
Jorge Lucangeli Obes | b845b15 | 2015-12-08 20:52:41 -0800 | [diff] [blame] | 81 | |
Jorge Lucangeli Obes | 2413f37 | 2016-04-06 18:43:10 -0700 | [diff] [blame] | 82 | # Example ASan-ified libminijail shared library for target. |
| 83 | # Commented out since it's only needed for local debugging. |
| 84 | # ========================================================= |
| 85 | # include $(CLEAR_VARS) |
| 86 | # LOCAL_MODULE := libminijail_asan |
| 87 | # LOCAL_MODULE_TAGS := optional |
| 88 | # |
| 89 | # LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 90 | # LOCAL_CLANG := true |
| 91 | # LOCAL_SANITIZE := address |
| 92 | # LOCAL_MODULE_RELATIVE_PATH := asan |
| 93 | # LOCAL_SRC_FILES := $(libminijailSrcFiles) |
| 94 | # |
| 95 | # LOCAL_STATIC_LIBRARIES := libminijail_generated |
| 96 | # LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 97 | # LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 98 | # include $(BUILD_SHARED_LIBRARY) |
| 99 | |
| 100 | |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 101 | # libminijail static library for target. |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 102 | # ========================================================= |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 103 | include $(CLEAR_VARS) |
| 104 | LOCAL_MODULE := libminijail |
| 105 | |
| 106 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 107 | LOCAL_CLANG := true |
| 108 | LOCAL_SRC_FILES := $(libminijailSrcFiles) |
| 109 | |
Jorge Lucangeli Obes | d2045ac | 2016-01-08 13:21:48 -0800 | [diff] [blame] | 110 | LOCAL_WHOLE_STATIC_LIBRARIES := libminijail_generated $(minijailCommonLibraries) |
Jorge Lucangeli Obes | 43e29b3 | 2015-12-08 21:07:14 -0800 | [diff] [blame] | 111 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 112 | include $(BUILD_STATIC_LIBRARY) |
| 113 | |
| 114 | |
Jorge Lucangeli Obes | a67bd6a | 2016-08-19 15:33:48 -0400 | [diff] [blame] | 115 | # libminijail native unit tests using gtest. Run with: |
| 116 | # adb shell /data/nativetest/libminijail_unittest_gtest/libminijail_unittest_gtest |
| 117 | # ========================================================= |
| 118 | include $(CLEAR_VARS) |
| 119 | LOCAL_MODULE := libminijail_unittest_gtest |
Dan Shi | 3b52601 | 2017-03-28 10:40:35 -0700 | [diff] [blame] | 120 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Jorge Lucangeli Obes | a67bd6a | 2016-08-19 15:33:48 -0400 | [diff] [blame] | 121 | |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 122 | LOCAL_CPP_EXTENSION := .cc |
Jorge Lucangeli Obes | a67bd6a | 2016-08-19 15:33:48 -0400 | [diff] [blame] | 123 | LOCAL_CFLAGS := $(minijailCommonCFlags) -Wno-writable-strings |
| 124 | LOCAL_CLANG := true |
| 125 | LOCAL_SRC_FILES := \ |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 126 | $(libminijailSrcFiles) \ |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 127 | libminijail_unittest.cc \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 128 | $(targetUnittestSrcFiles) |
Jorge Lucangeli Obes | a67bd6a | 2016-08-19 15:33:48 -0400 | [diff] [blame] | 129 | |
| 130 | LOCAL_STATIC_LIBRARIES := libminijail_generated |
| 131 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 132 | include $(BUILD_NATIVE_TEST) |
| 133 | |
| 134 | |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 135 | # # libminijail native unit tests for the host. Run with: |
| 136 | # # out/host/linux-x86/nativetest(64)/libminijail_unittest/libminijail_unittest_gtest |
| 137 | # # TODO(b/31395668): Re-enable once the seccomp(2) syscall becomes available. |
| 138 | # # ========================================================= |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 139 | # include $(CLEAR_VARS) |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 140 | # LOCAL_MODULE := libminijail_unittest_gtest |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 141 | # LOCAL_MODULE_HOST_OS := linux |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 142 | |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 143 | # LOCAL_CPP_EXTENSION := .cc |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 144 | # LOCAL_CFLAGS := $(minijailCommonCFlags) -DPRELOADPATH=\"/invalid\" |
| 145 | # LOCAL_CLANG := true |
| 146 | # LOCAL_SRC_FILES := \ |
| 147 | # $(libminijailSrcFiles) \ |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 148 | # libminijail_unittest.cc \ |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 149 | # $(hostUnittestSrcFiles) |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 150 | |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 151 | # LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 152 | # include $(BUILD_HOST_NATIVE_TEST) |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 153 | |
| 154 | |
Jorge Lucangeli Obes | 106d97f | 2016-08-19 12:34:02 -0400 | [diff] [blame] | 155 | # Syscall filtering native unit tests using gtest. Run with: |
| 156 | # adb shell /data/nativetest/syscall_filter_unittest_gtest/syscall_filter_unittest_gtest |
| 157 | # ========================================================= |
| 158 | include $(CLEAR_VARS) |
| 159 | LOCAL_MODULE := syscall_filter_unittest_gtest |
Dan Shi | 3b52601 | 2017-03-28 10:40:35 -0700 | [diff] [blame] | 160 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Jorge Lucangeli Obes | 106d97f | 2016-08-19 12:34:02 -0400 | [diff] [blame] | 161 | |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 162 | LOCAL_CPP_EXTENSION := .cc |
Jorge Lucangeli Obes | 106d97f | 2016-08-19 12:34:02 -0400 | [diff] [blame] | 163 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 164 | LOCAL_CLANG := true |
| 165 | LOCAL_SRC_FILES := \ |
| 166 | bpf.c \ |
| 167 | syscall_filter.c \ |
| 168 | util.c \ |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 169 | syscall_filter_unittest.cc \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 170 | $(targetUnittestSrcFiles) |
Jorge Lucangeli Obes | 106d97f | 2016-08-19 12:34:02 -0400 | [diff] [blame] | 171 | |
| 172 | LOCAL_STATIC_LIBRARIES := libminijail_generated |
| 173 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 174 | include $(BUILD_NATIVE_TEST) |
| 175 | |
| 176 | |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 177 | # Syscall filtering native unit tests for the host. Run with: |
Jorge Lucangeli Obes | 45932a5 | 2017-03-15 17:02:58 -0400 | [diff] [blame] | 178 | # out/host/linux-x86/nativetest(64)/syscall_filter_unittest_gtest/syscall_filter_unittest_gtest |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 179 | # ========================================================= |
| 180 | include $(CLEAR_VARS) |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 181 | LOCAL_MODULE := syscall_filter_unittest_gtest |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 182 | LOCAL_MODULE_HOST_OS := linux |
| 183 | |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 184 | LOCAL_CPP_EXTENSION := .cc |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 185 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 186 | LOCAL_CLANG := true |
| 187 | LOCAL_SRC_FILES := \ |
| 188 | bpf.c \ |
| 189 | syscall_filter.c \ |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 190 | util.c \ |
Jorge Lucangeli Obes | 9bd316b | 2017-01-26 17:21:16 -0500 | [diff] [blame] | 191 | syscall_filter_unittest.cc \ |
Jorge Lucangeli Obes | 2aa880c | 2016-08-01 16:16:35 -0400 | [diff] [blame] | 192 | $(hostUnittestSrcFiles) |
| 193 | |
| 194 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 195 | include $(BUILD_HOST_NATIVE_TEST) |
| 196 | |
| 197 | |
Mike Frysinger | 0b5cffa | 2017-08-15 18:06:18 -0400 | [diff] [blame] | 198 | # System functionality unit tests using gtest. Run with: |
| 199 | # adb shell /data/nativetest/system_unittest_gtest/system_unittest_gtest |
| 200 | # ========================================================= |
| 201 | include $(CLEAR_VARS) |
| 202 | LOCAL_MODULE := system_unittest_gtest |
| 203 | LOCAL_COMPATIBILITY_SUITE := device-tests |
| 204 | |
| 205 | LOCAL_CPP_EXTENSION := .cc |
| 206 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 207 | LOCAL_CLANG := true |
| 208 | LOCAL_SRC_FILES := \ |
| 209 | system.c \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 210 | util.c \ |
Mike Frysinger | 0b5cffa | 2017-08-15 18:06:18 -0400 | [diff] [blame] | 211 | system_unittest.cc \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 212 | $(targetUnittestSrcFiles) |
Mike Frysinger | 0b5cffa | 2017-08-15 18:06:18 -0400 | [diff] [blame] | 213 | |
| 214 | LOCAL_STATIC_LIBRARIES := libminijail_generated |
| 215 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 216 | include $(BUILD_NATIVE_TEST) |
| 217 | |
| 218 | |
| 219 | # System functionality native unit tests for the host. Run with: |
| 220 | # out/host/linux-x86/nativetest(64)/system_unittest_gtest/system_unittest_gtest |
| 221 | # ========================================================= |
| 222 | include $(CLEAR_VARS) |
| 223 | LOCAL_MODULE := system_unittest_gtest |
| 224 | LOCAL_MODULE_HOST_OS := linux |
| 225 | |
| 226 | LOCAL_CPP_EXTENSION := .cc |
| 227 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 228 | LOCAL_CLANG := true |
| 229 | LOCAL_SRC_FILES := \ |
| 230 | system.c \ |
Luis Hector Chavez | 114a930 | 2017-09-05 20:36:58 -0700 | [diff] [blame] | 231 | util.c \ |
Mike Frysinger | 0b5cffa | 2017-08-15 18:06:18 -0400 | [diff] [blame] | 232 | system_unittest.cc \ |
| 233 | $(hostUnittestSrcFiles) |
| 234 | |
| 235 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) |
| 236 | include $(BUILD_HOST_NATIVE_TEST) |
| 237 | |
| 238 | |
Jorge Lucangeli Obes | f9fcdbe | 2016-02-19 15:04:09 -0800 | [diff] [blame] | 239 | # libminijail_test executable for brillo_Minijail test. |
Jorge Lucangeli Obes | ac9e342 | 2016-02-03 15:00:42 -0800 | [diff] [blame] | 240 | # ========================================================= |
| 241 | include $(CLEAR_VARS) |
| 242 | LOCAL_MODULE := libminijail_test |
Dan Shi | 3b52601 | 2017-03-28 10:40:35 -0700 | [diff] [blame] | 243 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Jorge Lucangeli Obes | ac9e342 | 2016-02-03 15:00:42 -0800 | [diff] [blame] | 244 | |
| 245 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 246 | LOCAL_CLANG := true |
Jorge Lucangeli Obes | 64efa55 | 2017-03-14 14:57:50 -0400 | [diff] [blame] | 247 | LOCAL_GTEST := false |
Jorge Lucangeli Obes | ac9e342 | 2016-02-03 15:00:42 -0800 | [diff] [blame] | 248 | LOCAL_SRC_FILES := \ |
| 249 | test/libminijail_test.cpp |
| 250 | |
| 251 | LOCAL_SHARED_LIBRARIES := libbase libminijail |
Jorge Lucangeli Obes | 64efa55 | 2017-03-14 14:57:50 -0400 | [diff] [blame] | 252 | include $(BUILD_NATIVE_TEST) |
Jorge Lucangeli Obes | ac9e342 | 2016-02-03 15:00:42 -0800 | [diff] [blame] | 253 | |
| 254 | |
Jorge Lucangeli Obes | 6f967c5 | 2015-12-04 14:44:53 -0800 | [diff] [blame] | 255 | # libminijail usage example. |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 256 | # ========================================================= |
Jorge Lucangeli Obes | 6f967c5 | 2015-12-04 14:44:53 -0800 | [diff] [blame] | 257 | include $(CLEAR_VARS) |
| 258 | LOCAL_MODULE := drop_privs |
| 259 | LOCAL_MODULE_TAGS := optional |
| 260 | LOCAL_CFLAGS := $(minijailCommonCFlags) |
| 261 | LOCAL_CLANG := true |
Jorge Lucangeli Obes | 9e35c09 | 2016-04-11 13:30:08 -0700 | [diff] [blame] | 262 | # Don't build with ASan, but leave commented out for easy local debugging. |
| 263 | # LOCAL_SANITIZE := address |
Jorge Lucangeli Obes | 6f967c5 | 2015-12-04 14:44:53 -0800 | [diff] [blame] | 264 | LOCAL_SRC_FILES := \ |
| 265 | examples/drop_privs.cpp |
| 266 | |
| 267 | LOCAL_SHARED_LIBRARIES := libbase libminijail |
| 268 | include $(BUILD_EXECUTABLE) |
Jorge Lucangeli Obes | d99a40d | 2016-01-26 13:50:44 -0800 | [diff] [blame] | 269 | |
| 270 | |
| 271 | # minijail0 executable. |
| 272 | # This is not currently used on Brillo/Android, |
| 273 | # but it's convenient to be able to build it. |
| 274 | # ========================================================= |
| 275 | include $(CLEAR_VARS) |
| 276 | LOCAL_MODULE := minijail0 |
| 277 | LOCAL_MODULE_TAGS := optional |
| 278 | LOCAL_CFLAGS := \ |
| 279 | $(minijailCommonCFlags) -Wno-missing-field-initializers \ |
| 280 | -DPRELOADPATH=\"/invalidminijailpreload.so\" |
| 281 | LOCAL_CLANG := true |
| 282 | LOCAL_SRC_FILES := \ |
| 283 | elfparse.c \ |
| 284 | minijail0.c \ |
| 285 | |
| 286 | LOCAL_STATIC_LIBRARIES := libminijail_generated |
| 287 | LOCAL_SHARED_LIBRARIES := $(minijailCommonLibraries) libminijail |
| 288 | include $(BUILD_EXECUTABLE) |