Windows builds
This commit is contained in:
parent
e084044a58
commit
001c7e8ffa
9 changed files with 57 additions and 28 deletions
2
Osmand-kernel/.gitignore
vendored
2
Osmand-kernel/.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
osmand_main
|
||||
osmand_main*
|
||||
osm_out
|
||||
|
|
|
@ -10,7 +10,7 @@ ifeq ($(os),)
|
|||
os := darwin
|
||||
endif
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
os := win
|
||||
os := cygwin
|
||||
endif
|
||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||
os := win
|
||||
|
@ -31,24 +31,35 @@ endif
|
|||
|
||||
# os=Default is meant to be generic unix/linux
|
||||
linux_CXX := g++
|
||||
linux_CC := gcc
|
||||
linux_STRIP := strip
|
||||
#Default_LINKFLAGS := -shared
|
||||
|
||||
#
|
||||
Support10_4 := -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
darwin_CXX := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
|
||||
darwin_CC := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
|
||||
darwin_STRIP := strip -x
|
||||
#darwin_CPP_FLAGS := strip -x
|
||||
#darwin_LINKFLAGS := -dynamiclib $(Support10_4)
|
||||
|
||||
# mingw32 via Cygwin OBSOLETE : i686-pc-mingw32-
|
||||
# mingw64 via Cygwin : i686-w64-mingw32-
|
||||
# gcc via Cygwin : i686-pc-cygwin-
|
||||
# x86_64-w64-mingw32
|
||||
cygwin_CXX := i686-pc-cygwin-g++
|
||||
cygwin_CC := i686-pc-cygwin-gcc
|
||||
cygwin_STRIP := i686-pc-cygwin-strip
|
||||
|
||||
win_CXX := i586-mingw32msvc-gcc
|
||||
win_CC := i586-mingw32msvc-gcc
|
||||
win_STRIP := i586-mingw32msvc-strip
|
||||
win_CPP_FLAGS := -D_Windows
|
||||
#win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
|
||||
#win_LINKFLAGS := -Wl,--kill-at -shared
|
||||
|
||||
CXX := $($(os)_CXX)
|
||||
CC := $($(os)_CC)
|
||||
STRIP := $($(os)_STRIP)
|
||||
CPP_OS_FLAGS = $($(os)_CPP_FLAGS)
|
||||
#LINKFLAGS := $($(os)_LINKFLAGS)
|
|
@ -4,14 +4,15 @@ include Common.mk
|
|||
|
||||
CPP_FILE_EXTENSION = c
|
||||
LIBNAME := libexpat.a
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS) -Iexpat_library
|
||||
|
||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS)
|
||||
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||
|
|
|
@ -4,7 +4,7 @@ include Common.mk
|
|||
|
||||
CPP_FILE_EXTENSION = c
|
||||
LIBNAME := libft2.a
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES)
|
||||
|
@ -12,7 +12,8 @@ CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES)
|
|||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS)
|
||||
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||
|
|
8
Osmand-kernel/jni-prebuilt/.gitignore
vendored
8
Osmand-kernel/jni-prebuilt/.gitignore
vendored
|
@ -1,6 +1,2 @@
|
|||
x86/
|
||||
armeabi/
|
||||
armeabi-v7a/
|
||||
linux-x86/
|
||||
win-x86/
|
||||
darwin-x86/
|
||||
*
|
||||
!.gitignore
|
|
@ -1,7 +1,7 @@
|
|||
LOCAL_PATH := .
|
||||
include ../Makefile.vars
|
||||
include ./Common.mk
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
LIBNAME := osmand.lib
|
||||
LIBOSNAME := osmand-$(os)-$(arch).lib
|
||||
|
||||
|
@ -11,7 +11,7 @@ LOCAL_SRC_FILES += src/osmand_main.cpp
|
|||
|
||||
#LDFLAGS = -Wl,--hash-style=both -fPIC
|
||||
LDFLAGS = -Wall -fPIC -Wl,-Bsymbolic
|
||||
LDRUNFLAGS = -Wl,--hash-style=both
|
||||
#LDRUNFLAGS = -Wl,--hash-style=both
|
||||
# --trace -Bsymbolic -Bsymbolic-functions
|
||||
|
||||
LDLIBS = -L$(PREBUILT_DIR) -lskia -lproto -lpthread -lrt -lft2 -lexpat -lpng -lz
|
||||
|
@ -20,12 +20,30 @@ OBJECTS = $(LOCAL_SRC_FILES:src/%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/
|
|||
|
||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
||||
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
||||
else
|
||||
FIXED_JAVA_HOME := $(JAVA_HOME)
|
||||
endif
|
||||
|
||||
ifeq ($(java_os),)
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
java_os := linux
|
||||
endif
|
||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||
java_os := win32
|
||||
endif
|
||||
endif
|
||||
ifeq ($(os),)
|
||||
java_os := linux
|
||||
endif
|
||||
|
||||
CPPFLAGS := \
|
||||
-DGOOGLE_PROTOBUF_NO_RTTI \
|
||||
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
||||
-DSK_RELEASE \
|
||||
-DGR_RELEASE=1 \
|
||||
-c -fPIC -I$(JAVA_HOME)/include \
|
||||
-c -fPIC -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(java_os)" \
|
||||
-DHASH_MAP_GNU \
|
||||
$(C_INCLUDES)
|
||||
|
||||
|
@ -33,14 +51,13 @@ CPPFLAGS := \
|
|||
#target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
target : $(PREBUILT_DIR)/$(LIBNAME) ../$(RUNFILE)
|
||||
|
||||
|
||||
../$(RUNFILE) : $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
||||
$(CXX) $(LDRUNFLAGS) -o ../$(RUNFILE) $(OBJECTS) $(LDLIBS)
|
||||
@chmod +x ../$(RUNFILE)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBOSNAME)
|
||||
cp build/$(LIBOSNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBOSNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBOSNAME): $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
||||
$(CXX) -shared -o build/$(LIBOSNAME) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
|
||||
|
|
|
@ -4,7 +4,7 @@ include Common.mk
|
|||
|
||||
CPP_FILE_EXTENSION = c
|
||||
LIBNAME := libpng.a
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
||||
|
@ -12,14 +12,15 @@ CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
|||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS)
|
||||
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||
|
||||
build/obj-$(os)-$(arch)/%.o : %.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
||||
@mkdir -p `dirname $@`
|
||||
$(CXX) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
||||
$(CC) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
@ -3,7 +3,7 @@ include Common.mk
|
|||
|
||||
CPP_FILE_EXTENSION = cc
|
||||
LIBNAME := libproto.a
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||
CPPFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI -I. -fPIC
|
||||
LDLIBS = -lpthread
|
||||
|
@ -11,7 +11,8 @@ LDLIBS = -lpthread
|
|||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS)
|
||||
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||
|
|
|
@ -2,7 +2,7 @@ LOCAL_PATH = .
|
|||
include ../Makefile.vars
|
||||
include Common.mk
|
||||
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
LIBNAME := libskia.a
|
||||
|
||||
CPP_FILE_EXTENSION = cpp
|
||||
|
@ -31,18 +31,19 @@ CPPFLAGS := -DSK_RELEASE \
|
|||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fPIC \
|
||||
-DSK_BUILD_FOR_UNIX \
|
||||
$(C_INCLUDES)
|
||||
|
||||
LDLIBS = -lpthread
|
||||
|
||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
mkdir -p $(PREBUILT_DIR)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS)
|
||||
ar -rf build/$(LIBNAME) $(OBJECTS)
|
||||
cp build/$(LIBNAME) ../jni-prebuilt/linux-x86/$(LIBNAME)
|
||||
|
||||
build/obj-$(os)-$(arch)/%.o : %.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
||||
@mkdir -p `dirname $@`
|
||||
|
|
Loading…
Reference in a new issue