changeset 99:7e28d40db785

8072101: Support linux_x86 build Summary: CPU arch is subject to change from command line, READ is updated with an example Reviewed-by: jld
author snazarki
date Wed, 04 Feb 2015 15:38:05 +0300
parents eca473967edd
children 36e0d3e7b62e
files Makefile README
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 04 13:28:50 2015 +0400
+++ b/Makefile	Wed Feb 04 15:38:05 2015 +0300
@@ -143,11 +143,11 @@
 JAVAC := $(JAVA_HOME)/bin/javac
 JAR := $(JAVA_HOME)/bin/jar
 MKDIR := mkdir -p
-TARGET_CPU_LEGACY_LIB := arm
-TARGET_C_FLAGS = -fPIC -Wno-psabi -DJAVACALL_REPORT_LEVEL=0 -DENABLE_DEVICEACCESS -c -MMD -MF $(NATIVE_OUT_DIR)/$(@).d
-TARGET_INCLUDES := $(foreach d,$(DIO_INCLUDE_DIRS),-I$(d)) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-TARGET_CXX_FLAGS := -fPIC -Wno-psabi -DJAVACALL_REPORT_LEVEL=4 -DENABLE_DEVICEACCESS -c
-TARGET_LD_FLAGS:= -Xlinker -z -Xlinker defs -Xlinker -O1 \
+TARGET_CPU_LEGACY_LIB = arm
+TARGET_C_FLAGS = $(USER_C_FLAGS) -fPIC -Wno-psabi -DJAVACALL_REPORT_LEVEL=0 -DENABLE_DEVICEACCESS -c -MMD -MF $(NATIVE_OUT_DIR)/$(@).d
+TARGET_INCLUDES = $(foreach d,$(DIO_INCLUDE_DIRS),-I$(d)) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
+TARGET_CXX_FLAGS = $(USER_CXX_FLAGS) -fPIC -Wno-psabi -DJAVACALL_REPORT_LEVEL=4 -DENABLE_DEVICEACCESS -c
+TARGET_LD_FLAGS= $(USER_LD_FLAGS) -Xlinker -z -Xlinker defs -Xlinker -O1 \
           -shared \
           -Xlinker -rpath -Xlinker \$$ORIGIN -lpthread -lrt \
           -Xlinker -z -Xlinker muldefs -lstdc++
--- a/README	Wed Feb 04 13:28:50 2015 +0400
+++ b/README	Wed Feb 04 15:38:05 2015 +0300
@@ -15,5 +15,9 @@
   export JAVA_HOME=<location of JDK8 install>
   make
 
+To make build for i386 cpu arch on x86-64 platform following flags need to be set:
+  export USER_FLAGS = '-march=i386 -m32'
+  make TARGET_CPU_LEGACY_LIB=i386 USER_C_FLAGS=$(USER_FLAGS) USER_CXX_FLAGS=$(USER_FLAGS) USER_LD_FLAGS=$(USER_FLAGS) 
+
 The resulting Device I/O library files should be found in build/jar and build/so