Makefiles :)
This commit is contained in:
parent
62346fe8f4
commit
e20dbeb038
25 changed files with 1034 additions and 1046 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,16 +1,9 @@
|
|||
include Makefile.vars
|
||||
build :
|
||||
cd protobuf; $(MAKE)
|
||||
cd png; $(MAKE)
|
||||
cd skia; $(MAKE)
|
||||
cd expat; $(MAKE)
|
||||
cd freetype; $(MAKE)
|
||||
cd osmand; $(MAKE)
|
||||
|
||||
clean :
|
||||
cd protobuf; $(MAKE) clean
|
||||
cd png; $(MAKE) clean
|
||||
cd skia; $(MAKE) clean
|
||||
cd expat; $(MAKE) clean
|
||||
cd freetype; $(MAKE) clean
|
||||
cd osmand; $(MAKE) clean
|
||||
projects := protobuf png skia expat freetype osmand
|
||||
|
||||
.DEFAULT: installr
|
||||
.PHONY: release debug clean installr installd
|
||||
|
||||
installr release debug clean installd:
|
||||
@- $(foreach project,$(projects), \
|
||||
$(MAKE) --directory=./$(project) $@; \
|
||||
)
|
||||
|
|
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)
|
||||
endif
|
||||
|
||||
ARCH := x86
|
||||
|
||||
arch := x86
|
||||
############################################################################################################################
|
||||
|
||||
ifeq ($(os),)
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(shell uname),Darwin)
|
||||
os := darwin
|
||||
TARGET := darwin
|
||||
endif
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
os := cygwin
|
||||
TARGET := cygwin
|
||||
endif
|
||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||
os := win
|
||||
TARGET := win
|
||||
endif
|
||||
endif
|
||||
ifeq ($(os),)
|
||||
os := linux
|
||||
ifeq ($(TARGET),)
|
||||
TARGET := linux
|
||||
endif
|
||||
|
||||
# Windows uses different path separators, because they hate me
|
||||
ifeq ($(os),win)
|
||||
ifeq ($(TARGET),win)
|
||||
sep := ;
|
||||
else
|
||||
sep := :
|
||||
|
@ -43,15 +44,6 @@ 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
|
||||
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_CC := i586-mingw32msvc-gcc
|
||||
|
@ -59,9 +51,26 @@ 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)
|
||||
LDFLAGS := $($(os)_LDFLAGS)
|
||||
### Cygwin target ###
|
||||
cygwin_CXX := i686-pc-cygwin-g++
|
||||
cygwin_CC := i686-pc-cygwin-gcc
|
||||
cygwin_STRIP := i686-pc-cygwin-strip
|
||||
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)
|
||||
else
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
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
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
|
|
@ -1,25 +1,13 @@
|
|||
LOCAL_PATH = .
|
||||
# Include tools definitions
|
||||
include ../Makefile.vars
|
||||
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
CPP_FILE_EXTENSION = c
|
||||
LIBNAME := libexpat.a
|
||||
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) -Iexpat_library
|
||||
# Set library name
|
||||
LIBNAME = $(LIBRARY_PREFIX)expat
|
||||
LIBTYPE = $(STATICLIB_EXT)
|
||||
|
||||
target : $(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)
|
||||
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
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
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
LOCAL_PATH = .
|
||||
# Include tools definitions
|
||||
include ../Makefile.vars
|
||||
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
CPP_FILE_EXTENSION = c
|
||||
LIBNAME := libft2.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)
|
||||
# Set library name
|
||||
LIBNAME = $(LIBRARY_PREFIX)ft2
|
||||
LIBTYPE = $(STATICLIB_EXT)
|
||||
|
||||
target : $(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)
|
||||
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
|
@ -30,6 +30,6 @@ include $(BUILD_STATIC_LIBRARY)
|
|||
|
||||
else
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
|
|
@ -86,6 +86,6 @@ include $(BUILD_STATIC_LIBRARY)
|
|||
|
||||
else
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
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 ./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
|
||||
|
||||
#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))
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
# 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)
|
||||
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
||||
else
|
||||
FIXED_JAVA_HOME := $(JAVA_HOME)
|
||||
endif
|
||||
|
||||
ifeq ($(java_os),)
|
||||
ifeq ($(JAVA_OS),)
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
java_os := win32
|
||||
JAVA_OS := win32
|
||||
endif
|
||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||
java_os := win32
|
||||
JAVA_OS := win32
|
||||
endif
|
||||
endif
|
||||
ifeq ($(os),)
|
||||
java_os := linux
|
||||
ifeq ($(JAVA_OS),)
|
||||
JAVA_OS := linux
|
||||
endif
|
||||
|
||||
CPPFLAGS := \
|
||||
OSMAND_FLAGS = \
|
||||
-DGOOGLE_PROTOBUF_NO_RTTI \
|
||||
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
||||
-DSK_RELEASE \
|
||||
-DGR_RELEASE=1 \
|
||||
-c -fPIC -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(java_os)" \
|
||||
-DHASH_MAP_GNU \
|
||||
$(C_INCLUDES) \
|
||||
$(CPP_OS_FLAGS)
|
||||
-c -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(JAVA_OS)" \
|
||||
-DHASH_MAP_GNU
|
||||
|
||||
#target : ../$(RUNFILE)
|
||||
#target : $(PREBUILT_DIR)/$(LIBNAME)
|
||||
target : $(PREBUILT_DIR)/$(LIBNAME) ../$(RUNFILE)
|
||||
CFLAGS += $(OSMAND_FLAGS)
|
||||
CXXFLAGS += $(OSMAND_FLAGS)
|
||||
|
||||
../$(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)
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
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
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
LOCAL_PATH = .
|
||||
# Include tools definitions
|
||||
include ../Makefile.vars
|
||||
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
CPP_FILE_EXTENSION = c
|
||||
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) $(CPP_OS_FLAGS)
|
||||
# Set library name
|
||||
LIBNAME = $(LIBRARY_PREFIX)png
|
||||
LIBTYPE = $(STATICLIB_EXT)
|
||||
|
||||
target : $(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)
|
||||
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
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
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
|
|
@ -1,25 +1,16 @@
|
|||
# Include tools definitions
|
||||
include ../Makefile.vars
|
||||
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
CPP_FILE_EXTENSION = cc
|
||||
LIBNAME := libproto.a
|
||||
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
|
||||
# Set library name
|
||||
LIBNAME = $(LIBRARY_PREFIX)proto
|
||||
LIBTYPE = $(STATICLIB_EXT)
|
||||
CXXFLAGS += -DGOOGLE_PROTOBUF_NO_RTTI
|
||||
LDFLAGS += -lpthread
|
||||
LOCAL_C_INCLUDES += .
|
||||
|
||||
target : $(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)
|
||||
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
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
|
||||
LOCAL_SRC_FILES := \
|
||||
../jni-prebuilt/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
LOCAL_PATH = .
|
||||
# Include tools definitions
|
||||
include ../Makefile.vars
|
||||
|
||||
# Include project files
|
||||
LOCAL_PATH = .
|
||||
include Common.mk
|
||||
|
||||
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)
|
||||
LIBNAME := libskia.a
|
||||
# Set library name
|
||||
LIBNAME = $(LIBRARY_PREFIX)skia
|
||||
LIBTYPE = $(STATICLIB_EXT)
|
||||
|
||||
CPP_FILE_EXTENSION = cpp
|
||||
# Library content
|
||||
LOCAL_SRC_FILES += \
|
||||
$(OSMAND_SKIA_LOC)/src/opts/SkBlitRow_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/SkGlobalInitialization_default.cpp
|
||||
|
||||
OBJECTS = $(LOCAL_SRC_FILES:%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
||||
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
||||
|
||||
CPPFLAGS := -DSK_RELEASE \
|
||||
SKIAFLAGS = \
|
||||
-DSK_RELEASE \
|
||||
-DGR_RELEASE=1 \
|
||||
-DSK_ENABLE_LIBPNG \
|
||||
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
||||
-DNDEBUG \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fPIC \
|
||||
-DSK_BUILD_FOR_UNIX \
|
||||
$(C_INCLUDES)
|
||||
-DSK_BUILD_FOR_UNIX
|
||||
|
||||
CFLAGS += $(SKIAFLAGS)
|
||||
CXXFLAGS += $(SKIAFLAGS)
|
||||
|
||||
LDLIBS = -lpthread
|
||||
|
||||
target : $(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)
|
||||
|
||||
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)
|
||||
# Finally, include generic rules
|
||||
include ../Makefile.rules
|
Loading…
Reference in a new issue