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 = \
|
|
|
|
-DGOOGLE_PROTOBUF_NO_RTTI \
|
|
|
|
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
|
|
|
-DSK_RELEASE \
|
|
|
|
-DGR_RELEASE=1 \
|
|
|
|
-DHASH_MAP_GNU
|
2012-05-31 21:01:27 +02:00
|
|
|
LIBNAME = $(LIBRARY_PREFIX)osmand
|
|
|
|
LIBTYPE = $(DYNAMICLIB_EXT)
|
2012-06-04 09:13:33 +02:00
|
|
|
LDLIBS += -lskia -lproto -lpthread -lft2 -lexpat -lpng
|
|
|
|
ifeq ($(TARGET),nacl)
|
|
|
|
LDLIBS += -L$(TC_PATH)/i686-nacl/usr/lib -lz
|
|
|
|
OSMAND_FLAGS += \
|
|
|
|
-DRT_NOT_SUPPORTED
|
|
|
|
LOCAL_SRC_FILES += \
|
|
|
|
src/osmand_nacl.c
|
|
|
|
else
|
|
|
|
LDLIBS += -lrt -lz
|
|
|
|
LOCAL_SRC_FILES += \
|
|
|
|
src/java_wrap.cpp
|
|
|
|
# Set library name
|
|
|
|
|
|
|
|
|
2012-05-28 20:56:12 +02:00
|
|
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
|
|
|
FIXED_JAVA_HOME := $(shell cygpath -u "$(JAVA_HOME)")
|
|
|
|
else
|
|
|
|
FIXED_JAVA_HOME := $(JAVA_HOME)
|
|
|
|
endif
|
2012-05-31 21:01:27 +02:00
|
|
|
ifeq ($(JAVA_OS),)
|
2012-05-28 20:56:12 +02:00
|
|
|
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
2012-05-31 21:01:27 +02:00
|
|
|
JAVA_OS := win32
|
2012-05-28 20:56:12 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
2012-05-31 21:01:27 +02:00
|
|
|
JAVA_OS := win32
|
2012-05-28 20:56:12 +02:00
|
|
|
endif
|
|
|
|
endif
|
2012-05-31 21:01:27 +02:00
|
|
|
ifeq ($(JAVA_OS),)
|
|
|
|
JAVA_OS := linux
|
2012-05-28 20:56:12 +02:00
|
|
|
endif
|
2012-06-04 09:13:33 +02:00
|
|
|
OSMAND_FLAGS += -c -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(JAVA_OS)"
|
|
|
|
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
|
|
|
|
include ../Makefile.rules
|