2012-05-01 00:30:31 +02:00
|
|
|
LOCAL_PATH := .
|
2012-05-15 20:48:06 +02:00
|
|
|
include ../Makefile.vars
|
|
|
|
include ./Common.mk
|
|
|
|
PREBUILT_DIR = ../jni-prebuilt/$(os)-$(arch)/
|
2012-04-30 15:58:02 +02:00
|
|
|
LIBNAME := osmand.lib
|
2012-05-15 21:32:29 +02:00
|
|
|
LIBOSNAME := osmand-$(os)-$(arch).lib
|
|
|
|
|
2012-05-01 01:43:09 +02:00
|
|
|
RUNFILE := osmand_main
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES += src/osmand_main.cpp
|
2012-04-30 15:58:02 +02:00
|
|
|
|
2012-05-11 00:35:08 +02:00
|
|
|
#LDFLAGS = -Wl,--hash-style=both -fPIC
|
|
|
|
LDFLAGS = -Wall -fPIC -Wl,-Bsymbolic
|
2012-05-01 01:43:09 +02:00
|
|
|
LDRUNFLAGS = -Wl,--hash-style=both
|
2012-05-11 00:35:08 +02:00
|
|
|
# --trace -Bsymbolic -Bsymbolic-functions
|
2012-05-01 01:43:09 +02:00
|
|
|
|
2012-05-27 21:10:44 +02:00
|
|
|
LDLIBS = -L$(PREBUILT_DIR) -lskia -lproto -lpthread -lrt -lft2 -lexpat -lpng -lz
|
2012-05-01 00:30:31 +02:00
|
|
|
CPP_FILE_EXTENSION = cpp
|
2012-05-15 20:48:06 +02:00
|
|
|
OBJECTS = $(LOCAL_SRC_FILES:src/%.$(CPP_FILE_EXTENSION)=build/obj-$(os)-$(arch)/%.o)
|
2012-04-30 15:58:02 +02:00
|
|
|
|
2012-05-01 00:30:31 +02:00
|
|
|
C_INCLUDES := $(addprefix -I, $(LOCAL_C_INCLUDES))
|
2012-04-30 15:58:02 +02:00
|
|
|
|
|
|
|
CPPFLAGS := \
|
|
|
|
-DGOOGLE_PROTOBUF_NO_RTTI \
|
|
|
|
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
|
|
|
|
-DSK_RELEASE \
|
|
|
|
-DGR_RELEASE=1 \
|
2012-05-12 18:27:59 +02:00
|
|
|
-c -fPIC -I$(JAVA_HOME)/include \
|
2012-05-01 20:49:45 +02:00
|
|
|
-DHASH_MAP_GNU \
|
2012-05-01 00:30:31 +02:00
|
|
|
$(C_INCLUDES)
|
2012-05-01 01:43:09 +02:00
|
|
|
|
2012-05-09 09:47:48 +02:00
|
|
|
#target : ../$(RUNFILE)
|
2012-05-27 21:10:44 +02:00
|
|
|
#target : $(PREBUILT_DIR)/$(LIBNAME)
|
|
|
|
target : $(PREBUILT_DIR)/$(LIBNAME) ../$(RUNFILE)
|
2012-05-01 01:43:09 +02:00
|
|
|
|
|
|
|
|
2012-05-11 00:35:08 +02:00
|
|
|
../$(RUNFILE) : $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
2012-05-01 01:43:09 +02:00
|
|
|
$(CXX) $(LDRUNFLAGS) -o ../$(RUNFILE) $(OBJECTS) $(LDLIBS)
|
|
|
|
@chmod +x ../$(RUNFILE)
|
2012-04-30 15:58:02 +02:00
|
|
|
|
2012-05-15 21:32:29 +02:00
|
|
|
$(PREBUILT_DIR)/$(LIBNAME) : build/$(LIBOSNAME)
|
|
|
|
cp build/$(LIBOSNAME) $(PREBUILT_DIR)/$(LIBNAME)
|
2012-04-30 15:58:02 +02:00
|
|
|
|
|
|
|
|
2012-05-15 21:32:29 +02:00
|
|
|
build/$(LIBOSNAME): $(OBJECTS) $(PREBUILT_DIR)/libskia.a $(PREBUILT_DIR)/libproto.a Makefile
|
|
|
|
$(CXX) -shared -o build/$(LIBOSNAME) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
|
2012-05-01 00:30:31 +02:00
|
|
|
|
2012-05-27 21:10:44 +02:00
|
|
|
build/obj-$(os)-$(arch)/%.o : src/%.$(CPP_FILE_EXTENSION) $(LOCAL_C_INCLUDES) src/textdraw.cpp
|
2012-05-01 00:30:31 +02:00
|
|
|
@mkdir -p `dirname $@`
|
|
|
|
$(CXX) -o $@ -c src/$*.$(CPP_FILE_EXTENSION) $(CPPFLAGS)
|
2012-04-30 15:58:02 +02:00
|
|
|
|
|
|
|
clean:
|
2012-05-01 00:30:31 +02:00
|
|
|
$(RM) $(OBJECTS) build/$(LIBNAME)
|