1
2LOCAL_PATH := $(call my-dir)
3
4include $(CLEAR_VARS)
5
6LOCAL_MODULE    := osgNativeLib
7### Main Install dir
8NDK_ROOT                := /Users/thomashogarth/Library/Android/sdk/ndk-bundle
9OSG_ANDROID_DIR		:= /Users/thomashogarth/Documents/AlphaPixel/osgEarth-Droid/osg/
10OSGEARTH_ANDROID_DIR	:= /Users/thomashogarth/Documents/AlphaPixel/osgEarth-Droid/osgearth/
11THIRDPARTY_ANDROID_DIR	:= /Users/thomashogarth/Documents/AlphaPixel/osgEarth-Droid/osg/3rdParty
12
13OSG_LIBDIR 			:= $(OSG_ANDROID_DIR)/lib
14OSGEARTH_LIBDIR 		:= $(OSGEARTH_ANDROID_DIR)/lib
15PNG_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/libpng/obj/local/armeabi
16TIFF_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/libtiff/obj/local/armeabi
17GDAL_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/gdal/obj/local/armeabi
18GEOS_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/geos/obj/local/armeabi
19PROJ_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/proj/obj/local/armeabi
20CURL_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/curl/obj/local/armeabi
21FREETYPE_LIBDIR 		:= $(THIRDPARTY_ANDROID_DIR)/build/freetype/obj/local/armeabi
22SQLITE_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/sqlite/obj/local/armeabi
23ZLIB_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/zlib/obj/local/armeabi
24
25ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
26	LOCAL_ARM_NEON 	:= true
27	OSG_LIBDIR 			:= $(OSG_ANDROID_DIR)/lib
28	OSGEARTH_LIBDIR 		:= $(OSGEARTH_ANDROID_DIR)/lib
29	PNG_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/libpng/obj/local/armeabi-v7a
30	TIFF_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/libtiff/obj/local/armeabi-v7a
31	GDAL_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/gdal/obj/local/armeabi-v7a
32	GEOS_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/geos/obj/local/armeabi-v7a
33	PROJ_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/proj/obj/local/armeabi-v7a
34	CURL_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/curl/obj/local/armeabi-v7a
35	FREETYPE_LIBDIR 		:= $(THIRDPARTY_ANDROID_DIR)/build/freetype/obj/local/armeabi-v7a
36	SQLITE_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/sqlite/obj/local/armeabi-v7a
37	ZLIB_LIBDIR 			:= $(THIRDPARTY_ANDROID_DIR)/build/zlib/obj/local/armeabi-v7a
38endif
39
40### Add all source file names to be included in lib separated by a whitespace
41
42LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include $(OSGEARTH_ANDROID_DIR)/src
43LOCAL_CFLAGS    := -Werror -fno-short-enums
44LOCAL_CPPFLAGS  := -DOSG_LIBRARY_STATIC -DOSGEARTH_LIBRARY_STATIC
45
46LOCAL_LDLIBS    := -llog -lGLESv3 -lz -ldl -lgnustl_static -lsupc++
47
48LOCAL_SRC_FILES := osgNativeLib.cpp OsgMainApp.cpp OsgAndroidNotifyHandler.cpp
49
50
51#-losgdb_osgearth_agglite \
52#-losgdb_tiff \
53#-losgdb_png \
54#-losgdb_zip \
55
56LOCAL_LDFLAGS   += -L$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -lgnustl_static -lsupc++ \
57-L $(OSGEARTH_LIBDIR) \
58-losgdb_osgearth_arcgis \
59-losgdb_osgearth_bing \
60-losgdb_osgearth_bumpmap \
61-losgdb_osgearth_cache_filesystem \
62-losgdb_osgearth_colorramp \
63-losgdb_osgearth_debug \
64-losgdb_osgearth_detail \
65-losgdb_earth \
66-losgdb_osgearth_engine_mp \
67-losgdb_osgearth_engine_rex \
68-losgdb_osgearth_feature_elevation \
69-losgdb_osgearth_feature_ogr \
70-losgdb_osgearth_feature_tfs \
71-losgdb_osgearth_feature_wfs \
72-losgdb_osgearth_feature_xyz \
73-losgdb_osgearth_featurefilter_intersect \
74-losgdb_osgearth_featurefilter_join \
75-losgdb_osgearth_gdal \
76-losgdb_kml \
77-losgdb_osgearth_label_annotation \
78-losgdb_osgearth_mapinspector \
79-losgdb_osgearth_mask_feature \
80-losgdb_osgearth_mbtiles \
81-losgdb_osgearth_model_feature_geom \
82-losgdb_osgearth_model_simple \
83-losgdb_osgearth_monitor \
84-losgdb_osgearth_ocean_simple \
85-losgdb_osgearth_osg \
86-losgdb_osgearth_scriptengine_javascript \
87-losgdb_osgearth_sky_gl \
88-losgdb_osgearth_sky_simple \
89-losgdb_osgearth_skyview \
90-losgdb_template \
91-losgdb_osgearth_terrainshader \
92-losgdb_osgearth_tileindex \
93-losgdb_osgearth_tms \
94-losgdb_osgearth_vdatum_egm84 \
95-losgdb_osgearth_vdatum_egm96 \
96-losgdb_osgearth_vdatum_egm2008 \
97-losgdb_osgearth_viewpoints \
98-losgdb_osgearth_vpb \
99-losgdb_osgearth_wcs \
100-losgdb_osgearth_wms \
101-losgdb_osgearth_xyz \
102-losgEarthAnnotation \
103-losgEarthFeatures \
104-losgEarthSymbology \
105-losgEarthUtil \
106-losgEarth \
107-L $(OSG_LIBDIR) \
108-losgdb_openflight \
109-losgdb_curl \
110-losgdb_obj \
111-losgdb_shp \
112-losgdb_rot \
113-losgdb_scale \
114-losgdb_trans \
115-losgdb_jpeg \
116-losgdb_freetype \
117-losgdb_osgterrain \
118-losgdb_osg \
119-losgdb_ive \
120-losgdb_deprecated_osgviewer \
121-losgdb_deprecated_osgvolume \
122-losgdb_deprecated_osgtext \
123-losgdb_deprecated_osgterrain \
124-losgdb_deprecated_osgsim \
125-losgdb_deprecated_osgshadow \
126-losgdb_deprecated_osgparticle \
127-losgdb_deprecated_osgfx \
128-losgdb_deprecated_osganimation \
129-losgdb_deprecated_osg \
130-losgdb_serializers_osgvolume \
131-losgdb_serializers_osgtext \
132-losgdb_serializers_osgterrain \
133-losgdb_serializers_osgsim \
134-losgdb_serializers_osgshadow \
135-losgdb_serializers_osgparticle \
136-losgdb_serializers_osgmanipulator \
137-losgdb_serializers_osgfx \
138-losgdb_serializers_osganimation \
139-losgdb_serializers_osg \
140-losgViewer \
141-losgVolume \
142-losgTerrain \
143-losgText \
144-losgShadow \
145-losgSim \
146-losgParticle \
147-losgManipulator \
148-losgGA \
149-losgFX \
150-losgDB \
151-losgAnimation \
152-losgUtil \
153-losg \
154-lOpenThreads \
155-L $(PNG_LIBDIR) \
156-lpng \
157-L $(FREETYPE_LIBDIR) \
158-lft2 \
159-L $(CURL_LIBDIR) \
160-lcurl \
161-L $(GDAL_LIBDIR) \
162-lgdal \
163-L $(GEOS_LIBDIR) \
164-lgeos \
165-L $(PROJ_LIBDIR) \
166-lproj \
167-L $(SQLITE_LIBDIR) \
168-lsqlite3 \
169-L $(ZLIB_LIBDIR) \
170-lzlib
171
172include $(BUILD_SHARED_LIBRARY)
173