summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-08-28 08:43:48 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-08-29 22:17:09 -0700
commitb5bf2e150e95b2cc75e1fe0d8ef6a0080916af0d (patch)
tree87af700156206bfe575e0184b302b44f5354967a /examples
parent690035ce829dd1f624e675470778152e01ff8e77 (diff)
android: Add Android support
Add Android support for Waffle. This uses Android.mk files for compiling. By default the compilation is for Jelly Bean, adding defintion for BUILD_FOR_ICS will be able to compile for Ice Cream Sandwitch. [chadv]: Changes from Juha-Pekka's original patch: - Update with changes to build system. - Add 'include/waffle' to Android.mk:LOCAL_C_INCLUDES. A parallel change has occured in the CMake build on master. - Generate waffle_version.h at buildtime, just as CMake does. - Fix namespace and prefix issues. - File android_surface_surfaceflingerlink.cpp added symbols to the C++ namespace 'android', but that namespace is owned by the Android platform. So I renamed the namespace to 'waffle'. - All files added C symbols prefixed with 'android', but that prefix is also owned by the Android platform. So I changed the prefix of all such symbols to 'droid'. Accordingly, I renamed all files from 'android_$stuff.[ch]' to 'droid_$stuff.[ch]' to match the naming convention followed by other directories. Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/Android.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/Android.mk b/examples/Android.mk
new file mode 100644
index 0000000..9ae3994
--- /dev/null
+++ b/examples/Android.mk
@@ -0,0 +1,19 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE:= gl_basic
+
+LOCAL_CFLAGS:= \
+ -DANDROID_STUB \
+ -DWAFFLE_HAS_ANDROID \
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include/
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/../src/
+
+LOCAL_SRC_FILES:= \
+ gl_basic.c \
+
+LOCAL_SHARED_LIBRARIES := libwaffle
+
+include $(BUILD_EXECUTABLE)