Stephen Hines | ce5d5dc | 2013-09-06 16:53:40 -0700 | [diff] [blame] | 1 | # Don't build the library unless forced to. |
| 2 | ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS)) |
Tim Murray | 9e8bf2c | 2013-03-06 10:12:22 -0800 | [diff] [blame] | 3 | # Don't build the library in unbundled branches. |
| 4 | ifeq (,$(TARGET_BUILD_APPS)) |
| 5 | |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 6 | LOCAL_PATH:= $(call my-dir) |
| 7 | |
Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 8 | clang_whole_static_libraries := \ |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 9 | libclangAnalysis \ |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 10 | libclangAST \ |
Tao Bao | db719ce | 2015-02-19 14:45:44 -0800 | [diff] [blame^] | 11 | libclangASTMatchers \ |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 12 | libclangBasic \ |
Tao Bao | db719ce | 2015-02-19 14:45:44 -0800 | [diff] [blame^] | 13 | libclangCodeGen \ |
| 14 | libclangDriver \ |
| 15 | libclangEdit \ |
| 16 | libclangFormat \ |
| 17 | libclangFrontend \ |
| 18 | libclangIndex \ |
| 19 | libclangLex \ |
| 20 | libclangLibclang \ |
| 21 | libclangParse \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 22 | libclangRewrite \ |
Todd Fiala | 3313f88 | 2013-10-22 16:11:47 -0700 | [diff] [blame] | 23 | libclangRewriteFrontend \ |
Tao Bao | db719ce | 2015-02-19 14:45:44 -0800 | [diff] [blame^] | 24 | libclangSema \ |
| 25 | libclangSerialization \ |
| 26 | libclangTooling |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 27 | |
Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 28 | # host |
| 29 | include $(CLEAR_VARS) |
| 30 | |
| 31 | LOCAL_IS_HOST_MODULE := true |
| 32 | LOCAL_MODULE:= libclang |
| 33 | LOCAL_MODULE_TAGS := optional |
| 34 | LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 35 | |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 36 | ifeq ($(HOST_OS),windows) |
Logan Chien | 6835021 | 2014-06-11 02:29:45 +0800 | [diff] [blame] | 37 | LOCAL_SHARED_LIBRARIES := libLLVM |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 38 | LOCAL_LDLIBS := -limagehlp -lpsapi |
| 39 | else |
Logan Chien | 6835021 | 2014-06-11 02:29:45 +0800 | [diff] [blame] | 40 | LOCAL_SHARED_LIBRARIES := libLLVM libc++ |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 41 | LOCAL_LDLIBS := -ldl -lpthread |
| 42 | endif |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 43 | |
| 44 | include $(CLANG_HOST_BUILD_MK) |
| 45 | include $(BUILD_HOST_SHARED_LIBRARY) |
Tim Murray | 9e8bf2c | 2013-03-06 10:12:22 -0800 | [diff] [blame] | 46 | |
Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 47 | # device |
| 48 | include $(CLEAR_VARS) |
| 49 | |
| 50 | LOCAL_MODULE:= libclang |
| 51 | LOCAL_MODULE_TAGS := optional |
| 52 | LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) |
| 53 | |
| 54 | LOCAL_SHARED_LIBRARIES := libLLVM libc++ |
| 55 | LOCAL_LDLIBS := -ldl |
| 56 | |
| 57 | include $(CLANG_DEVICE_BUILD_MK) |
| 58 | include $(BUILD_SHARED_LIBRARY) |
| 59 | |
Stephen Hines | ce5d5dc | 2013-09-06 16:53:40 -0700 | [diff] [blame] | 60 | endif # don't build in unbundled branches |
| 61 | endif # don't build unless forced to |