| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | include $(CLEAR_VARS) |
| 4 | include $(CLEAR_TBLGEN_VARS) |
| 5 | |
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 6 | # Only do this when Clang is available. |
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 7 | CLANG_ROOT_PATH := external/clang |
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 8 | ifneq ($(wildcard $(CLANG_ROOT_PATH)/clang.mk),) |
| 9 | |
| 10 | LLVM_ROOT_PATH := external/llvm |
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 11 | include $(CLANG_ROOT_PATH)/clang.mk |
| 12 | |
| 13 | LOCAL_MODULE := versioner |
| 14 | LOCAL_MODULE_TAGS := optional |
| 15 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 16 | |
| 17 | TBLGEN_TABLES := \ |
| 18 | AttrList.inc \ |
| 19 | AttrVisitor.inc \ |
| 20 | Attrs.inc \ |
| 21 | CommentCommandList.inc \ |
| 22 | DeclNodes.inc \ |
| 23 | DiagnosticCommonKinds.inc \ |
| 24 | StmtNodes.inc \ |
| 25 | |
| 26 | LOCAL_SRC_FILES := \ |
| 27 | versioner.cpp \ |
| 28 | Arch.cpp \ |
| 29 | DeclarationDatabase.cpp \ |
| Josh Gao | f8592a3 | 2016-07-26 18:58:27 -0700 | [diff] [blame] | 30 | Preprocessor.cpp \ |
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 31 | SymbolDatabase.cpp \ |
| 32 | Utils.cpp |
| 33 | |
| 34 | LOCAL_SHARED_LIBRARIES := libclang libLLVM |
| 35 | |
| 36 | include $(CLANG_HOST_BUILD_MK) |
| 37 | include $(CLANG_TBLGEN_RULES_MK) |
| 38 | |
| 39 | # Set these after including the clang makefiles, to avoid getting CFLAGS from them. |
| 40 | LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter |
| 41 | LOCAL_CFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS |
| 42 | LOCAL_CPPFLAGS := -std=c++14 -fno-rtti |
| 43 | |
| 44 | LOCAL_MODULE_HOST_OS := linux |
| 45 | |
| 46 | include $(BUILD_HOST_EXECUTABLE) |
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 47 | |
| 48 | endif |