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 | libclangDriver \ |
| 10 | libclangParse \ |
| 11 | libclangSema \ |
| 12 | libclangAnalysis \ |
| 13 | libclangCodeGen \ |
| 14 | libclangAST \ |
| 15 | libclangEdit \ |
| 16 | libclangLex \ |
| 17 | libclangFrontend \ |
| 18 | libclangBasic \ |
Todd Fiala | 3313f88 | 2013-10-22 16:11:47 -0700 | [diff] [blame] | 19 | libclangRewriteFrontend \ |
| 20 | libclangRewriteCore \ |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 21 | libclangSerialization |
| 22 | |
Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 23 | # host |
| 24 | include $(CLEAR_VARS) |
| 25 | |
| 26 | LOCAL_IS_HOST_MODULE := true |
| 27 | LOCAL_MODULE:= libclang |
| 28 | LOCAL_MODULE_TAGS := optional |
| 29 | LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 30 | |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 31 | ifeq ($(HOST_OS),windows) |
Logan Chien | 6835021 | 2014-06-11 02:29:45 +0800 | [diff] [blame] | 32 | LOCAL_SHARED_LIBRARIES := libLLVM |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 33 | LOCAL_LDLIBS := -limagehlp -lpsapi |
| 34 | else |
Logan Chien | 6835021 | 2014-06-11 02:29:45 +0800 | [diff] [blame] | 35 | LOCAL_SHARED_LIBRARIES := libLLVM libc++ |
Stephen Hines | f553c8d | 2013-02-27 17:04:46 -0800 | [diff] [blame] | 36 | LOCAL_LDLIBS := -ldl -lpthread |
| 37 | endif |
Stephen Hines | f71d14a | 2013-02-27 13:34:21 -0800 | [diff] [blame] | 38 | |
| 39 | include $(CLANG_HOST_BUILD_MK) |
| 40 | include $(BUILD_HOST_SHARED_LIBRARY) |
Tim Murray | 9e8bf2c | 2013-03-06 10:12:22 -0800 | [diff] [blame] | 41 | |
Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 42 | # device |
| 43 | include $(CLEAR_VARS) |
| 44 | |
| 45 | LOCAL_MODULE:= libclang |
| 46 | LOCAL_MODULE_TAGS := optional |
| 47 | LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) |
| 48 | |
| 49 | LOCAL_SHARED_LIBRARIES := libLLVM libc++ |
| 50 | LOCAL_LDLIBS := -ldl |
| 51 | |
| 52 | include $(CLANG_DEVICE_BUILD_MK) |
| 53 | include $(BUILD_SHARED_LIBRARY) |
| 54 | |
Stephen Hines | ce5d5dc | 2013-09-06 16:53:40 -0700 | [diff] [blame] | 55 | endif # don't build in unbundled branches |
| 56 | endif # don't build unless forced to |