Makefiles :)
This commit is contained in:
parent
62346fe8f4
commit
e20dbeb038
25 changed files with 1034 additions and 1046 deletions
|
@ -1,16 +1,9 @@
|
||||||
include Makefile.vars
|
projects := protobuf png skia expat freetype osmand
|
||||||
build :
|
|
||||||
cd protobuf; $(MAKE)
|
|
||||||
cd png; $(MAKE)
|
|
||||||
cd skia; $(MAKE)
|
|
||||||
cd expat; $(MAKE)
|
|
||||||
cd freetype; $(MAKE)
|
|
||||||
cd osmand; $(MAKE)
|
|
||||||
|
|
||||||
clean :
|
.DEFAULT: installr
|
||||||
cd protobuf; $(MAKE) clean
|
.PHONY: release debug clean installr installd
|
||||||
cd png; $(MAKE) clean
|
|
||||||
cd skia; $(MAKE) clean
|
installr release debug clean installd:
|
||||||
cd expat; $(MAKE) clean
|
@- $(foreach project,$(projects), \
|
||||||
cd freetype; $(MAKE) clean
|
$(MAKE) --directory=./$(project) $@; \
|
||||||
cd osmand; $(MAKE) clean
|
)
|
||||||
|
|
76
Osmand-kernel/Makefile.rules
Executable file
76
Osmand-kernel/Makefile.rules
Executable file
|
@ -0,0 +1,76 @@
|
||||||
|
# Just check if we have everything defined
|
||||||
|
ifeq ($(CC_SOURCE_FILES_EXTS),)
|
||||||
|
CC_SOURCE_FILES_EXTS := c cc
|
||||||
|
endif
|
||||||
|
ifeq ($(CXX_SOURCE_FILES_EXTS),)
|
||||||
|
CXX_SOURCE_FILES_EXTS := cpp cxx
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Target configuration
|
||||||
|
CXXFLAGS_debug := -g -O0
|
||||||
|
CFLAGS_debug := -g -O0
|
||||||
|
CXXFLAGS_release := -O2
|
||||||
|
CFLAGS_release := -O2
|
||||||
|
|
||||||
|
# Get the build type
|
||||||
|
PREBUILT_DIR_PREFIX = ../lib/$(TARGET)-$(ARCH)
|
||||||
|
|
||||||
|
# Collect objects
|
||||||
|
OBJECTS = $(foreach sourceFilesExt,$(CC_SOURCE_FILES_EXTS), \
|
||||||
|
$(patsubst %.$(sourceFilesExt),obj-$(TARGET)-$(ARCH)/%.$(sourceFilesExt).cc.o,$(filter %.$(sourceFilesExt),$(LOCAL_SRC_FILES))) \
|
||||||
|
) $(foreach sourceFilesExt,$(CXX_SOURCE_FILES_EXTS), \
|
||||||
|
$(patsubst %.$(sourceFilesExt),obj-$(TARGET)-$(ARCH)/%.$(sourceFilesExt).cxx.o,$(filter %.$(sourceFilesExt),$(LOCAL_SRC_FILES))) \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Default target
|
||||||
|
.DEFAULT: installr
|
||||||
|
|
||||||
|
# Declare phony targets
|
||||||
|
.PHONY: release debug clean installr installd
|
||||||
|
|
||||||
|
# Precious targets
|
||||||
|
.PRECIOUS: build-release/$(LIBNAME).$(LIBTYPE) build-debug/$(LIBNAME).$(LIBTYPE) $(addprefix build-release/,$(OBJECTS)) $(addprefix build-debug/,$(OBJECTS))
|
||||||
|
|
||||||
|
# Route build targets properly
|
||||||
|
installr: install-release
|
||||||
|
installd: install-debug
|
||||||
|
release: build-release/$(LIBNAME).$(LIBTYPE)
|
||||||
|
debug: build-debug/$(LIBNAME).$(LIBTYPE)
|
||||||
|
|
||||||
|
# Clean removes all objects
|
||||||
|
clean:
|
||||||
|
$(RM) -r build-release
|
||||||
|
$(RM) -r build-debug
|
||||||
|
|
||||||
|
# This target copies final output file to prebuilt folder
|
||||||
|
install-%: %
|
||||||
|
@mkdir -p $(PREBUILT_DIR_PREFIX)-$*
|
||||||
|
cp build-$*/$(LIBNAME).$(LIBTYPE) $(PREBUILT_DIR_PREFIX)-$*/$(LIBNAME).$(LIBTYPE)
|
||||||
|
|
||||||
|
# Builds source files using CC compiler
|
||||||
|
build-release/obj-$(TARGET)-$(ARCH)/%.cc.o : % $(LOCAL_C_INCLUDES)
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CC) -o $@ -c $< $(CFLAGS_release) $(CFLAGS) $(addprefix -I, $(LOCAL_C_INCLUDES)) $(LOCAL_CFLAGS)
|
||||||
|
build-debug/obj-$(TARGET)-$(ARCH)/%.cc.o : % $(LOCAL_C_INCLUDES)
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CC) -o $@ -c $< $(CFLAGS_debug) $(CFLAGS) $(addprefix -I, $(LOCAL_C_INCLUDES)) $(LOCAL_CFLAGS)
|
||||||
|
|
||||||
|
# Builds source files using CXX compiler
|
||||||
|
build-release/obj-$(TARGET)-$(ARCH)/%.cxx.o : % $(LOCAL_C_INCLUDES)
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CXX) -o $@ -c $< $(CXXFLAGS_release) $(CFLAGS) $(addprefix -I, $(LOCAL_C_INCLUDES)) $(LOCAL_CFLAGS)
|
||||||
|
build-debug/obj-$(TARGET)-$(ARCH)/%.cxx.o : % $(LOCAL_C_INCLUDES)
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CXX) -o $@ -c $< $(CXXFLAGS_debug) $(CFLAGS) $(addprefix -I, $(LOCAL_C_INCLUDES)) $(LOCAL_CFLAGS)
|
||||||
|
|
||||||
|
# This target assembles static library
|
||||||
|
.SECONDEXPANSION:
|
||||||
|
build-%/$(LIBNAME).$(STATICLIB_EXT): $$(addprefix build-%/,$(OBJECTS))
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(AR) rs $@ $?
|
||||||
|
|
||||||
|
# This target assembles dynamic library
|
||||||
|
.SECONDEXPANSION:
|
||||||
|
build-%/$(LIBNAME).$(DYNAMICLIB_EXT): $$(addprefix build-%/,$(OBJECTS))
|
||||||
|
@mkdir -p `dirname $@`
|
||||||
|
$(CXX) -shared -o $@ $? -L$(PREBUILT_DIR_PREFIX)-$* $(LDFLAGS) $(LDLIBS)
|
|
@ -2,26 +2,27 @@ ifndef JAVA_HOME
|
||||||
$(error Set JAVA_HOME environment variable)
|
$(error Set JAVA_HOME environment variable)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ARCH := x86
|
||||||
|
|
||||||
arch := x86
|
############################################################################################################################
|
||||||
|
|
||||||
ifeq ($(os),)
|
ifeq ($(TARGET),)
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(shell uname),Darwin)
|
||||||
os := darwin
|
TARGET := darwin
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||||
os := cygwin
|
TARGET := cygwin
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||||
os := win
|
TARGET := win
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(os),)
|
ifeq ($(TARGET),)
|
||||||
os := linux
|
TARGET := linux
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Windows uses different path separators, because they hate me
|
# Windows uses different path separators, because they hate me
|
||||||
ifeq ($(os),win)
|
ifeq ($(TARGET),win)
|
||||||
sep := ;
|
sep := ;
|
||||||
else
|
else
|
||||||
sep := :
|
sep := :
|
||||||
|
@ -43,15 +44,6 @@ darwin_STRIP := strip -x
|
||||||
#darwin_CPP_FLAGS := strip -x
|
#darwin_CPP_FLAGS := strip -x
|
||||||
#darwin_LINKFLAGS := -dynamiclib $(Support10_4)
|
#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
|
|
||||||
cygwin_LDFLAGS := -Wl,--kill-at
|
|
||||||
cygwin_CPP_FLAGS := -D__int64="long long" -D_JNI_IMPLEMENTATION -D_REENTRANT -D_GNU_SOURCE
|
|
||||||
|
|
||||||
win_CXX := i586-mingw32msvc-gcc
|
win_CXX := i586-mingw32msvc-gcc
|
||||||
win_CC := i586-mingw32msvc-gcc
|
win_CC := i586-mingw32msvc-gcc
|
||||||
|
@ -59,9 +51,26 @@ win_STRIP := i586-mingw32msvc-strip
|
||||||
win_CPP_FLAGS := -D_Windows
|
win_CPP_FLAGS := -D_Windows
|
||||||
#win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
|
#win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
|
||||||
#win_LINKFLAGS := -Wl,--kill-at -shared
|
#win_LINKFLAGS := -Wl,--kill-at -shared
|
||||||
|
############################################################################################################################
|
||||||
|
|
||||||
CXX := $($(os)_CXX)
|
### Cygwin target ###
|
||||||
CC := $($(os)_CC)
|
cygwin_CXX := i686-pc-cygwin-g++
|
||||||
STRIP := $($(os)_STRIP)
|
cygwin_CC := i686-pc-cygwin-gcc
|
||||||
CPP_OS_FLAGS := $($(os)_CPP_FLAGS)
|
cygwin_STRIP := i686-pc-cygwin-strip
|
||||||
LDFLAGS := $($(os)_LDFLAGS)
|
cygwin_LDFLAGS := -Wl,--kill-at
|
||||||
|
cygwin_CFLAGS := -D__int64="long long" -D_JNI_IMPLEMENTATION -D_REENTRANT -D_GNU_SOURCE
|
||||||
|
cygwin_CXXFLAGS := -D__int64="long long" -D_JNI_IMPLEMENTATION -D_REENTRANT -D_GNU_SOURCE
|
||||||
|
cygwin_STATICLIB_EXT := lib
|
||||||
|
cygwin_DYNAMICLIB_EXT := dll
|
||||||
|
cygwin_LIBRARY_PREFIX := # empty
|
||||||
|
|
||||||
|
# Publish chosen settings as global
|
||||||
|
CXX := $($(TARGET)_CXX)
|
||||||
|
CC := $($(TARGET)_CC)
|
||||||
|
STRIP := $($(TARGET)_STRIP)
|
||||||
|
CFLAGS := $($(TARGET)_CFLAGS)
|
||||||
|
CXXFLAGS := $($(TARGET)_CXXFLAGS)
|
||||||
|
LDFLAGS := $($(TARGET)_LDFLAGS)
|
||||||
|
STATICLIB_EXT := $($(TARGET)_STATICLIB_EXT)
|
||||||
|
DYNAMICLIB_EXT := $($(TARGET)_DYNAMICLIB_EXT)
|
||||||
|
LIBRARY_PREFIX := $($(TARGET)_LIBRARY_PREFIX)
|
|
@ -15,7 +15,7 @@ LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
||||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
include $(PREBUILT_SHARED_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
2
Osmand-kernel/expat/.gitignore
vendored
2
Osmand-kernel/expat/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build
|
build-*
|
|
@ -16,6 +16,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,25 +1,13 @@
|
||||||
LOCAL_PATH = .
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
|
|
||||||
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
CPP_FILE_EXTENSION = c
|
# Set library name
|
||||||
LIBNAME := libexpat.a
|
LIBNAME = $(LIBRARY_PREFIX)expat
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
LIBTYPE = $(STATICLIB_EXT)
|
||||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
|
||||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES) $(CPP_OS_FLAGS) -Iexpat_library
|
|
||||||
|
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
# Finally, include generic rules
|
||||||
|
include ../Makefile.rules
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(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)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
2
Osmand-kernel/freetype/.gitignore
vendored
2
Osmand-kernel/freetype/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build/
|
build-*
|
|
@ -20,6 +20,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,26 +1,13 @@
|
||||||
LOCAL_PATH = .
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
|
|
||||||
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
CPP_FILE_EXTENSION = c
|
# Set library name
|
||||||
LIBNAME := libft2.a
|
LIBNAME = $(LIBRARY_PREFIX)ft2
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
LIBTYPE = $(STATICLIB_EXT)
|
||||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
|
||||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
|
||||||
CPPFLAGS = $(LOCAL_CFLAGS) $(C_INCLUDES)
|
|
||||||
|
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
# Finally, include generic rules
|
||||||
|
include ../Makefile.rules
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(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)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
|
@ -30,6 +30,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -86,6 +86,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
2
Osmand-kernel/osmand/.gitignore
vendored
2
Osmand-kernel/osmand/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build
|
build-*
|
|
@ -1,71 +1,40 @@
|
||||||
LOCAL_PATH := .
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
include ./Common.mk
|
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
|
||||||
LIBNAME := osmand.lib
|
|
||||||
LIBOSNAME := osmand-$(os)-$(arch).lib
|
|
||||||
|
|
||||||
RUNFILE := osmand_main
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
LOCAL_SRC_FILES += src/osmand_main.cpp
|
include Common.mk
|
||||||
|
|
||||||
#LDFLAGS = -Wl,--hash-style=both -fPIC
|
|
||||||
LDFLAGS := $(LDFLAGS) -Wall -fPIC -Wl,-Bsymbolic
|
|
||||||
#LDRUNFLAGS = -Wl,--hash-style=both
|
|
||||||
# --trace -Bsymbolic -Bsymbolic-functions
|
|
||||||
|
|
||||||
LDLIBS = -L$(PREBUILT_DIR) -lskia -lproto -lpthread -lrt -lft2 -lexpat -lpng -lz
|
|
||||||
CPP_FILE_EXTENSION = cpp
|
|
||||||
OBJECTS = $(LOCAL_SRC_FILES:src/%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
|
||||||
|
|
||||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
|
||||||
|
|
||||||
|
# Set library name
|
||||||
|
LIBNAME = $(LIBRARY_PREFIX)osmand
|
||||||
|
LIBTYPE = $(DYNAMICLIB_EXT)
|
||||||
|
LDLIBS += -l$(LIBRARY_PREFIX)skia -l$(LIBRARY_PREFIX)proto -l$(LIBRARY_PREFIX)pthread -l$(LIBRARY_PREFIX)rt -l$(LIBRARY_PREFIX)ft2 -l$(LIBRARY_PREFIX)expat -l$(LIBRARY_PREFIX)png -l$(LIBRARY_PREFIX)z
|
||||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||||
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
||||||
else
|
else
|
||||||
FIXED_JAVA_HOME := $(JAVA_HOME)
|
FIXED_JAVA_HOME := $(JAVA_HOME)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(JAVA_OS),)
|
||||||
ifeq ($(java_os),)
|
|
||||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||||
java_os := win32
|
JAVA_OS := win32
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||||
java_os := win32
|
JAVA_OS := win32
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(os),)
|
ifeq ($(JAVA_OS),)
|
||||||
java_os := linux
|
JAVA_OS := linux
|
||||||
endif
|
endif
|
||||||
|
OSMAND_FLAGS = \
|
||||||
CPPFLAGS := \
|
|
||||||
-DGOOGLE_PROTOBUF_NO_RTTI \
|
-DGOOGLE_PROTOBUF_NO_RTTI \
|
||||||
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
||||||
-DSK_RELEASE \
|
-DSK_RELEASE \
|
||||||
-DGR_RELEASE=1 \
|
-DGR_RELEASE=1 \
|
||||||
-c -fPIC -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(java_os)" \
|
-c -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(JAVA_OS)" \
|
||||||
-DHASH_MAP_GNU \
|
-DHASH_MAP_GNU
|
||||||
$(C_INCLUDES) \
|
|
||||||
$(CPP_OS_FLAGS)
|
|
||||||
|
|
||||||
#target : ../$(RUNFILE)
|
CFLAGS += $(OSMAND_FLAGS)
|
||||||
#target : $(PREBUILT_DIR)/$(LIBNAME)
|
CXXFLAGS += $(OSMAND_FLAGS)
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME) ../$(RUNFILE)
|
|
||||||
|
|
||||||
../$(RUNFILE) : $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
# Finally, include generic rules
|
||||||
$(CXX) $(LDRUNFLAGS) -o ../$(RUNFILE) $(OBJECTS) $(LDLIBS)
|
include ../Makefile.rules
|
||||||
@chmod +x ../$(RUNFILE)
|
|
||||||
|
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBOSNAME)
|
|
||||||
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)
|
|
||||||
|
|
||||||
build/obj-$(os)-$(arch)/%.o : src/%.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES) src/textdraw.cpp
|
|
||||||
@mkdir -p `dirname $@`
|
|
||||||
$(CXX) -o $@ -c src/$*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
2
Osmand-kernel/png/.gitignore
vendored
2
Osmand-kernel/png/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build
|
build-*
|
|
@ -35,6 +35,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,26 +1,13 @@
|
||||||
LOCAL_PATH = .
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
|
|
||||||
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
CPP_FILE_EXTENSION = c
|
# Set library name
|
||||||
LIBNAME := libpng.a
|
LIBNAME = $(LIBRARY_PREFIX)png
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
LIBTYPE = $(STATICLIB_EXT)
|
||||||
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)
|
|
||||||
|
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
# Finally, include generic rules
|
||||||
|
include ../Makefile.rules
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(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 $@`
|
|
||||||
$(CC) -o $@ -c $*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
2
Osmand-kernel/protobuf/.gitignore
vendored
2
Osmand-kernel/protobuf/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build
|
build-*
|
|
@ -22,6 +22,6 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,25 +1,16 @@
|
||||||
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
|
|
||||||
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
CPP_FILE_EXTENSION = cc
|
# Set library name
|
||||||
LIBNAME := libproto.a
|
LIBNAME = $(LIBRARY_PREFIX)proto
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
LIBTYPE = $(STATICLIB_EXT)
|
||||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
CXXFLAGS += -DGOOGLE_PROTOBUF_NO_RTTI
|
||||||
CPPFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI -I. -fPIC
|
LDFLAGS += -lpthread
|
||||||
LDLIBS = -lpthread
|
LOCAL_C_INCLUDES += .
|
||||||
|
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
# Finally, include generic rules
|
||||||
|
include ../Makefile.rules
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(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)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
2
Osmand-kernel/skia/.gitignore
vendored
2
Osmand-kernel/skia/.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build/
|
build-*
|
|
@ -113,7 +113,7 @@ include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
else
|
else
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
LOCAL_PATH = .
|
# Include tools definitions
|
||||||
include ../Makefile.vars
|
include ../Makefile.vars
|
||||||
|
|
||||||
|
# Include project files
|
||||||
|
LOCAL_PATH = .
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
# Set library name
|
||||||
LIBNAME := libskia.a
|
LIBNAME = $(LIBRARY_PREFIX)skia
|
||||||
|
LIBTYPE = $(STATICLIB_EXT)
|
||||||
|
|
||||||
CPP_FILE_EXTENSION = cpp
|
# Library content
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
$(OSMAND_SKIA_LOC)/src/opts/SkBlitRow_opts_none.cpp \
|
$(OSMAND_SKIA_LOC)/src/opts/SkBlitRow_opts_none.cpp \
|
||||||
$(OSMAND_SKIA_LOC)/src/opts/SkBitmapProcState_opts_none.cpp \
|
$(OSMAND_SKIA_LOC)/src/opts/SkBitmapProcState_opts_none.cpp \
|
||||||
|
@ -20,34 +24,18 @@ LOCAL_SRC_FILES += \
|
||||||
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_gamma.cpp \
|
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_gamma.cpp \
|
||||||
$(OSMAND_SKIA_LOC)/src/ports/SkGlobalInitialization_default.cpp
|
$(OSMAND_SKIA_LOC)/src/ports/SkGlobalInitialization_default.cpp
|
||||||
|
|
||||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
SKIAFLAGS = \
|
||||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
-DSK_RELEASE \
|
||||||
|
|
||||||
CPPFLAGS := -DSK_RELEASE \
|
|
||||||
-DGR_RELEASE=1 \
|
-DGR_RELEASE=1 \
|
||||||
-DSK_ENABLE_LIBPNG \
|
-DSK_ENABLE_LIBPNG \
|
||||||
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
||||||
-DNDEBUG \
|
-DNDEBUG \
|
||||||
-fno-rtti \
|
-fno-rtti \
|
||||||
-fno-exceptions \
|
-fno-exceptions \
|
||||||
-fPIC \
|
-DSK_BUILD_FOR_UNIX
|
||||||
-DSK_BUILD_FOR_UNIX \
|
|
||||||
$(C_INCLUDES)
|
|
||||||
|
|
||||||
LDLIBS = -lpthread
|
CFLAGS += $(SKIAFLAGS)
|
||||||
|
CXXFLAGS += $(SKIAFLAGS)
|
||||||
|
|
||||||
target : $(PREBUILT_DIR)/$(LIBNAME)
|
# Finally, include generic rules
|
||||||
|
include ../Makefile.rules
|
||||||
$(PREBUILT_DIR)/$(LIBNAME) : build/$(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)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJECTS) build/$(LIBNAME)
|
|
Loading…
Reference in a new issue