Commits

camlspotter  committed 9208ab8

removed config/Makefile,s.h,m.h from .hgignore, since it requires special customization

  • Participants
  • Parent commits e729148
  • Branches android

Comments (0)

Files changed (2)

 byterun/primitives$
 byterun/prims\.c$
 byterun/version\.h$
-config/Makefile$
 config/config\.sh$
 config/m\.h$
 config/s\.h$

File config/Makefile

+### designated for Android NDK r7
+
+### 1. EDIT BELOW ------------------------------------
+PREFIX=/home/jun/.share/prefix/ocaml-android
+
+ANDROID_NDK_HOME=/home/jun/android-ndk-r8
+HOST_ARCH=linux-x86
+TARGET_ARCH=arm
+
+## the directory where gcc stays
+ARM_EABI_GCC=$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(HOST_ARCH)
+## the directory where libgcc.a stays
+ARM_EABI_GCCLIB=$(ARM_EABI_GCC)/lib/gcc/arm-linux-androideabi/4.4.3
+## the directory where /usr/lib/libc.so stays
+ANDROID_PLATFORM=$(ANDROID_NDK_HOME)/platforms/android-14/arch-$(TARGET_ARCH)
+
+#ml let mklib out files opts = Printf.sprintf "/Users/keigoi/Documents/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ar rc %s %s %s; /Users/keigoi/Documents/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib %s" out opts files out;;
+### 1. EDIT ABOVE ------------------------------------
+
+
+### ANDROID_GCC=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -nostdlib -isystem$(ANDROID_PLATFORM)/usr/include
+ANDROID_GCC=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc
+ANDROID_COMP_OPTS=-isystem$(ANDROID_PLATFORM)/usr/include -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fno-strict-aliasing -finline-limit=64 -Wa,--noexecstack -O0 -g -c -MMD -MP -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -DANDROID -D__BEOS__ -D__ARM_EABI__
+ANDROID_LINK_OPTS=-nostdlib -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc
+
+ANDROID_LIBS=-l:$(ARM_EABI_GCCLIB)/libgcc.a -L$(ANDROID_PLATFORM)/usr/lib -lc -lm -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-rpath-link=$(ANDROID_PLATFORM)/usr/lib
+
+AR=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-ar 
+BYTECC=$(ANDROID_GCC)
+BYTECCCOMPOPTS=$(ANDROID_COMP_OPTS)
+BYTECCLINKOPTS=$(ANDROID_LINK_OPTS)
+BYTECCLIBS=$(ANDROID_LIBS)
+BYTECCRPATH=
+
+NATIVECC=$(ANDROID_GCC)
+NATIVECCCOMPOPTS=$(ANDROID_COMP_OPTS)
+NATIVECCPROFOPTS=$(ANDROID_COMP_OPTS)
+NATIVECCLINKOPTS=$(ANDROID_LINK_OPTS)
+NATIVECCRPATH=
+NATIVECCLIBS=$(ANDROID_LIBS)
+
+PARTIALLD=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-ld -r
+PACKLD=$(PARTIALLD) -dynamic-linker /system/bin/linker -z nocopyreloc -o\ 
+
+MKEXE=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -nostdlib $(ANDROID_LINK_OPTS) $(ANDROID_PLATFORM)/usr/lib/crtbegin_dynamic.o
+MKEXE_EXTRA=$(ANDROID_PLATFORM)/usr/lib/crtend_android.o
+### MKDLL=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -shared -flat_namespace -nostdlib -Wl,-soname,$(TARGET) -Wl,-shared,-Bsymbolic $(OBJ) -Wl,--whole-archive -Wl,--no-whole-archive $(ANDROID_LIBS)
+MKDLL=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -shared -nostdlib -Wl,-shared,-Bsymbolic
+MKDLL_EXTRA=
+MKMAINDLL=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -shared -nostdlib -Wl,-shared,-Bsymbolic
+MKMAINDLL_EXTRA=
+
+RANLIB=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-ranlib
+RANLIBCMD=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-ranlib
+
+### How to build a static library
+MKLIB=$(AR) $(1) $(2); $(ARM_EABI_GCC)/bin/arm-linux-androideabi-ranlib $(1)
+
+ASPPPROFFLAGS=-DPROFILING
+ASPP=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-gcc -c
+ASM=$(ARM_EABI_GCC)/bin/arm-linux-androideabi-as
+
+### NATDYNLINK=true
+NATDYNLINK=false
+
+
+
+
+BINDIR=$(PREFIX)/bin
+LIBDIR=$(PREFIX)/lib/ocaml
+STUBLIBDIR=$(LIBDIR)/stublibs
+MANDIR=$(PREFIX)/man
+MANEXT=1
+SHARPBANGSCRIPTS=true
+BNG_ARCH=generic
+BNG_ASM_LEVEL=0
+### PTHREAD_LINK=-cclib -lpthread
+PTHREAD_LINK=
+X11_INCLUDES=-I/usr/X11R6/include
+X11_LINK=-L/usr/X11R6/lib -lX11
+DBM_INCLUDES=
+DBM_LINK=
+TK_DEFS=
+TK_LINK=
+LIBBFD_LINK=
+EXE=
+### SUPPORTS_SHARED_LIBRARIES=true
+SUPPORTS_SHARED_LIBRARIES=false
+SHAREDCCCOMPOPTS=
+MKSHAREDLIBRPATH=
+NATDYNLINKOPTS=
+SYSLIB=-l$(1)
+#ml let syslib x = "-l"^x;;
+
+ARCH=arm
+MODEL=default
+SYSTEM=linux
+
+PROFILING=prof
+DYNLINKOPTS=
+### OTHERLIBRARIES=unix str num dynlink bigarray systhreads threads graph dbm labltk
+OTHERLIBRARIES=unix str num bigarray dynlink
+DEBUGGER=ocamldebugger
+CC_PROFILE=-pg
+### SYSTHREAD_SUPPORT=true
+SYSTHREAD_SUPPORT=false
+
+DLLCCCOMPOPTS=
+IFLEXDIR=
+O=o
+A=a
+SO=so
+EXT_OBJ=.o
+EXT_ASM=.s
+EXT_LIB=.a
+EXT_DLL=.so
+EXTRALIBS=
+CCOMPTYPE=cc
+TOOLCHAIN=cc
+CMXS=cmxs