2012-05-31 21:01:27 +02:00
|
|
|
# Include tools definitions
|
2012-05-15 20:48:06 +02:00
|
|
|
include ../Makefile.vars
|
2012-05-15 21:32:29 +02:00
|
|
|
|
2012-05-31 21:01:27 +02:00
|
|
|
# Include project files
|
|
|
|
LOCAL_PATH = .
|
|
|
|
include Common.mk
|
2012-04-30 15:58:02 +02:00
|
|
|
|
2012-06-04 09:13:33 +02:00
|
|
|
OSMAND_FLAGS = \
|
2012-06-15 14:34:25 +02:00
|
|
|
-std=c++0x \
|
2012-06-04 09:13:33 +02:00
|
|
|
-DGOOGLE_PROTOBUF_NO_RTTI \
|
|
|
|
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
|
|
|
-DSK_RELEASE \
|
2012-06-15 14:34:25 +02:00
|
|
|
-DGR_RELEASE=1
|
2012-06-17 15:21:55 +02:00
|
|
|
|
|
|
|
OSMAND_FLAGS_WINDOWS = \
|
|
|
|
-DSK_BUILD_FOR_WIN32 \
|
|
|
|
-DMINGW_HAS_SECURE_API \
|
|
|
|
-DSkUserConfig_DEFINED \
|
|
|
|
-DPICTURE_VERSION_ICS=1 \
|
|
|
|
-DPICTURE_VERSION_JB=2 \
|
|
|
|
-DSK_SCALAR_IS_FLOAT \
|
|
|
|
-DSK_CAN_USE_FLOAT \
|
|
|
|
-DSK_CPU_LENDIAN
|
|
|
|
|
2012-05-31 21:01:27 +02:00
|
|
|
LIBNAME = $(LIBRARY_PREFIX)osmand
|
|
|
|
LIBTYPE = $(DYNAMICLIB_EXT)
|
2012-06-17 15:21:55 +02:00
|
|
|
LDLIBS += -Wl,--whole-archive -lskia -Wl,--no-whole-archive -lproto -lft2 -lexpat -lpng -lz
|
2012-06-04 21:18:50 +02:00
|
|
|
|
2012-06-18 20:19:22 +02:00
|
|
|
ifeq ($(TARGET),windows)
|
2012-06-17 15:21:55 +02:00
|
|
|
LDLIBS += -lwinmm -lgdi32 -lusp10
|
|
|
|
OSMAND_FLAGS += $(OSMAND_FLAGS_WINDOWS)
|
|
|
|
else ifeq ($(TARGET),nacl)
|
|
|
|
LDLIBS += -lpthread
|
2012-06-17 12:30:45 +02:00
|
|
|
else
|
2012-06-17 15:21:55 +02:00
|
|
|
LDLIBS += -lrt -lpthread
|
2012-06-04 23:49:39 +02:00
|
|
|
endif
|
|
|
|
|
2012-06-04 09:13:33 +02:00
|
|
|
ifeq ($(TARGET),nacl)
|
2012-06-17 15:21:55 +02:00
|
|
|
OSMAND_FLAGS += \
|
|
|
|
-DRT_NOT_SUPPORTED
|
|
|
|
LOCAL_SRC_FILES += \
|
|
|
|
src/osmand_nacl.cpp
|
2012-06-04 09:13:33 +02:00
|
|
|
else
|
2012-06-17 15:21:55 +02:00
|
|
|
LOCAL_SRC_FILES += \
|
|
|
|
src/java_wrap.cpp
|
2012-06-04 09:13:33 +02:00
|
|
|
|
2012-05-28 20:56:12 +02:00
|
|
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
2012-06-17 15:21:55 +02:00
|
|
|
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
|
|
|
else
|
|
|
|
FIXED_JAVA_HOME := $(JAVA_HOME)
|
2012-05-28 20:56:12 +02:00
|
|
|
endif
|
2012-06-17 15:21:55 +02:00
|
|
|
ifeq ($(JAVA_OS),)
|
|
|
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
|
|
|
JAVA_OS := win32
|
|
|
|
endif
|
|
|
|
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
|
|
|
JAVA_OS := win32
|
|
|
|
endif
|
2012-05-28 20:56:12 +02:00
|
|
|
endif
|
2012-06-17 15:21:55 +02:00
|
|
|
ifeq ($(JAVA_OS),)
|
|
|
|
JAVA_OS := linux
|
|
|
|
endif
|
|
|
|
OSMAND_FLAGS += -c -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(JAVA_OS)"
|
2012-06-04 23:49:39 +02:00
|
|
|
|
2012-06-04 09:13:33 +02:00
|
|
|
endif
|
2012-05-01 01:43:09 +02:00
|
|
|
|
2012-05-31 21:01:27 +02:00
|
|
|
CFLAGS += $(OSMAND_FLAGS)
|
|
|
|
CXXFLAGS += $(OSMAND_FLAGS)
|
2012-04-30 15:58:02 +02:00
|
|
|
|
2012-05-31 21:01:27 +02:00
|
|
|
# Finally, include generic rules
|
2012-06-17 15:21:55 +02:00
|
|
|
include ../Makefile.rules
|