Fix build
This commit is contained in:
parent
65a8dc8452
commit
d5c9aa85c2
4 changed files with 14 additions and 10 deletions
|
@ -23,7 +23,6 @@ endif
|
|||
# Windows uses different path separators, because they hate me
|
||||
ifeq ($(os),win)
|
||||
sep := ;
|
||||
_Windows :=
|
||||
else
|
||||
sep := :
|
||||
endif
|
||||
|
@ -39,15 +38,17 @@ linux_STRIP := strip
|
|||
Support10_4 := -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
darwin_CXX := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
|
||||
darwin_STRIP := strip -x
|
||||
#Darwin_LINKFLAGS := -dynamiclib $(Support10_4)
|
||||
#darwin_CPP_FLAGS := strip -x
|
||||
#darwin_LINKFLAGS := -dynamiclib $(Support10_4)
|
||||
|
||||
|
||||
win_CXX := i586-mingw32msvc-gcc
|
||||
win_STRIP := i586-mingw32msvc-strip
|
||||
# Win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
|
||||
# Win_LINKFLAGS := -Wl,--kill-at -shared
|
||||
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)
|
||||
STRIP := $($(os)_STRIP)
|
||||
#CFLAGS := $($(os)_CFLAGS)
|
||||
CPP_OS_FLAGS = $($(os)_CPP_FLAGS)
|
||||
#LINKFLAGS := $($(os)_LINKFLAGS)
|
|
@ -1,4 +1,5 @@
|
|||
LOCAL_PATH = .
|
||||
include ../Makefile.vars
|
||||
include Common.mk
|
||||
|
||||
CPP_FILE_EXTENSION = c
|
||||
|
|
|
@ -3,6 +3,8 @@ include ../Makefile.vars
|
|||
include ./Common.mk
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
||||
LIBNAME := osmand.lib
|
||||
LIBOSNAME := osmand-$(os)-$(arch).lib
|
||||
|
||||
RUNFILE := osmand_main
|
||||
|
||||
LOCAL_SRC_FILES += src/osmand_main.cpp
|
||||
|
@ -36,12 +38,12 @@ target : $(PREBUILT_DIR)/$(LIBNAME)
|
|||
$(CXX) $(LDRUNFLAGS) -o ../$(RUNFILE) $(OBJECTS) $(LDLIBS)
|
||||
@chmod +x ../$(RUNFILE)
|
||||
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBNAME)
|
||||
cp build/$(LIBNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBOSNAME)
|
||||
cp build/$(LIBOSNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
|
||||
build/$(LIBNAME): $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
||||
$(CXX) -shared -o build/$(LIBNAME) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
|
||||
build/$(LIBOSNAME): $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
||||
$(CXX) -shared -o build/$(LIBOSNAME) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
build/obj-$(os)-$(arch)/%.o : src/%.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES)
|
||||
@mkdir -p `dirname $@`
|
||||
|
|
|
@ -7,7 +7,7 @@ LIBNAME := libpng.a
|
|||
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)
|
||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS)
|
||||
|
||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
|
||||
|
|
Loading…
Reference in a new issue