1# 2# Build targets for an x86 processor 3# 4 5# x86 Environment Checks ####################################################### 6 7ifeq ($(ANDROID_BUILD_TOP),) 8$(error "You should supply an ANDROID_BUILD_TOP environment variable \ 9 containing a path to the Android source tree. This is typically \ 10 provided by initializing the Android build environment.") 11endif 12export X86_TOOLS_PREFIX=$(ANDROID_BUILD_TOP)/prebuilts/clang/host/linux-x86/clang-r346389c/bin/ 13 14# x86 Tools #################################################################### 15 16TARGET_AR = $(X86_TOOLS_PREFIX)llvm-ar 17TARGET_CC = $(X86_TOOLS_PREFIX)clang++ 18TARGET_LD = $(X86_TOOLS_PREFIX)clang++ 19 20# x86 Compiler Flags ########################################################### 21 22# Add x86 compiler flags. 23TARGET_CFLAGS += $(X86_CFLAGS) 24 25# x86 is purely used for testing, so always include debugging symbols 26TARGET_CFLAGS += -g 27 28# Enable position independence. 29TARGET_CFLAGS += -fpic 30 31# x86 Shared Object Linker Flags ############################################### 32 33TARGET_SO_LDFLAGS += -shared 34TARGET_SO_LDFLAGS += -Wl,-gc-sections 35 36# Optimization Level ########################################################### 37 38TARGET_CFLAGS += -O$(OPT_LEVEL) 39 40# Variant Specific Sources ##################################################### 41 42TARGET_VARIANT_SRCS += $(X86_SRCS) 43