mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
Add android platform
This commit is contained in:
parent
c8ca83836a
commit
3a42db9f6f
@ -54,7 +54,9 @@
|
||||
# include "signal.h"
|
||||
# include "sys/time.h"
|
||||
# include "sys/types.h"
|
||||
# ifndef __ANDROID__
|
||||
# include "sys/sysctl.h"
|
||||
# endif
|
||||
# include "sys/utsname.h"
|
||||
# include "sys/wait.h"
|
||||
|
||||
|
15
makefile
15
makefile
@ -353,6 +353,21 @@ ifeq ($(platform),freebsd)
|
||||
"-I$(JAVA_HOME)/include/freebsd" -I$(src) -pthread
|
||||
cflags = $(build-cflags)
|
||||
endif
|
||||
ifeq ($(platform),android)
|
||||
asm = arm
|
||||
pointer-size = 4
|
||||
no-psabi = -Wno-psabi
|
||||
toolchain = $(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/
|
||||
cflags = -std=gnu++0x -I$(ANDROID_NDK)/platforms/android-5/arch-arm/usr/include \
|
||||
-I$(toolchain)/lib/gcc/arm-linux-androideabi/4.7/include $(common-cflags)
|
||||
cflags += -marm $(no-psabi)
|
||||
|
||||
cxx = $(toolchain)/bin/arm-linux-androideabi-g++
|
||||
cc = $(toolchain)/bin/arm-linux-androideabi-gcc
|
||||
ar = $(toolchain)/bin/arm-linux-androideabi-ar
|
||||
ranlib = $(toolchain)/bin/arm-linux-androideabi-ranlib
|
||||
strip = $(toolchain)/bin/arm-linux-androideabi-strip
|
||||
endif
|
||||
|
||||
ifeq ($(platform),darwin)
|
||||
target-format = macho
|
||||
|
@ -12,10 +12,21 @@
|
||||
# define __STDC_CONSTANT_MACROS
|
||||
#endif
|
||||
|
||||
#include "sys/types.h"
|
||||
#ifdef __APPLE__
|
||||
# include "CoreFoundation/CoreFoundation.h"
|
||||
# include "sys/ucontext.h"
|
||||
# undef assert
|
||||
#elif defined __ANDROID__
|
||||
# include <asm/sigcontext.h> /* for sigcontext */
|
||||
# include <asm/signal.h> /* for stack_t */
|
||||
typedef struct ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
struct sigcontext uc_mcontext;
|
||||
unsigned long uc_sigmask;
|
||||
} ucontext_t;
|
||||
#else
|
||||
# if defined __FreeBSD__
|
||||
# include "limits.h"
|
||||
@ -24,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
#include "sys/mman.h"
|
||||
#include "sys/types.h"
|
||||
|
||||
#include "sys/stat.h"
|
||||
#include "sys/time.h"
|
||||
#include "time.h"
|
||||
@ -37,10 +48,10 @@
|
||||
#include "stdint.h"
|
||||
#include "dirent.h"
|
||||
#include "sched.h"
|
||||
|
||||
#include "arch.h"
|
||||
#include "system.h"
|
||||
|
||||
|
||||
#define ACQUIRE(x) MutexResource MAKE_NAME(mutexResource_) (x)
|
||||
|
||||
using namespace vm;
|
||||
|
Loading…
Reference in New Issue
Block a user