1 # 2 # Build targets for an x86 processor 3 # 4 5 # x86 Environment Checks ####################################################### 6 7 ifeq ($(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.") 11 endif 12 export X86_TOOLS_PREFIX=$(ANDROID_BUILD_TOP)/prebuilts/clang/host/linux-x86/clang-3688880/bin/ 13 14 # x86 Tools #################################################################### 15 16 TARGET_AR = $(X86_TOOLS_PREFIX)llvm-ar 17 TARGET_CC = $(X86_TOOLS_PREFIX)clang++ 18 TARGET_LD = $(X86_TOOLS_PREFIX)clang++ 19 20 # x86 Compiler Flags ########################################################### 21 22 # Add x86 compiler flags. 23 TARGET_CFLAGS += $(X86_CFLAGS) 24 25 # x86 is purely used for testing, so always include debugging symbols 26 TARGET_CFLAGS += -g 27 28 # Enable position independence. 29 TARGET_CFLAGS += -fpic 30 31 # x86 Shared Object Linker Flags ############################################### 32 33 TARGET_SO_LDFLAGS += -shared 34 35 # Optimization Level ########################################################### 36 37 TARGET_CFLAGS += -O$(OPT_LEVEL) 38 39 # Variant Specific Sources ##################################################### 40 41 TARGET_VARIANT_SRCS += $(X86_SRCS) 42