[cogl/wip/public-atlas-apis: 7/9] Add Android.mk based build support



commit 79e97eb15e0c06b3937f59e20177472d8e8cd076
Author: Robert Bragg <robert linux intel com>
Date:   Thu Feb 13 20:28:58 2014 +0000

    Add Android.mk based build support
    
    This makes it possible to build Cogl for Android using ndk-build instead
    of autotools. This is the typical way to build software for Android and
    much simpler than using autotools given that there's no need to
    dynamically probe the platform being built for. To make it easy to
    maintain this way of building Cogl this moves the list of source files
    that need to be built into a Makefile.sources file that can be included
    by cogl/Makefile.am and Android.mk

 Android.mk                        |   55 +++++
 cogl/Makefile.am                  |  398 +++----------------------------------
 cogl/Makefile.sources             |  367 ++++++++++++++++++++++++++++++++++
 cogl/android/cogl/cogl-defines.h  |   53 +++++
 deps/eglib/android/eglib-config.h |   15 ++
 5 files changed, 519 insertions(+), 369 deletions(-)
---
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..d086a8e
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,55 @@
+LOCAL_PATH := $(call my-dir)
+
+###########################
+#
+# Cogl shared library
+#
+###########################
+
+include $(CLEAR_VARS)
+
+LOCAL_CFLAGS := -O0
+
+LOCAL_MODULE := Cogl
+
+include $(LOCAL_PATH)/cogl/Makefile.sources
+
+LOCAL_C_INCLUDES := \
+  $(LOCAL_PATH) \
+  $(LOCAL_PATH)/deps/eglib/android \
+  $(LOCAL_PATH)/deps/eglib/src \
+  $(LOCAL_PATH)/cogl \
+  $(LOCAL_PATH)/cogl/android \
+  $(LOCAL_PATH)/cogl/android/cogl \
+  $(LOCAL_PATH)/cogl/winsys \
+  $(LOCAL_PATH)/cogl/driver/gl \
+  $(LOCAL_PATH)/cogl/driver/gl/gles
+
+LOCAL_EXPORT_C_INCLUDES := \
+  $(LOCAL_PATH)/deps/eglib/android \
+  $(LOCAL_PATH)/deps/eglib/src \
+  $(LOCAL_PATH) \
+  $(LOCAL_PATH)/cogl/android
+
+LOCAL_SRC_FILES := \
+  $(subst $(LOCAL_PATH)/,, \
+       $(filter-out %-win32.c, \
+               $(wildcard $(LOCAL_PATH)/deps/eglib/src/*.c) \
+        ) \
+       $(wildcard $(LOCAL_PATH)/test-fixtures/*.c) \
+   ) \
+  $(addprefix cogl/, \
+       $(filter %.c,$(cogl_sources_c)) \
+       $(filter %.c,$(cogl_driver_gles_sources)) \
+       $(filter %.c,$(cogl_sdl2_sources_c)) \
+   )
+
+LOCAL_CFLAGS += -DHAVE_CONFIG_H -DCOGL_COMPILATION -DCOGL_GLES2_LIBNAME=\"libGLESv2.so\" 
-DG_LOG_DOMAIN=\"Cogl\" -DCOGL_ENABLE_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_GL_DEBUG
+LOCAL_LDLIBS := -llog
+
+LOCAL_STATIC_LIBRARIES := SDL2
+
+LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 
-llog -landroid
+
+include $(BUILD_SHARED_LIBRARY)
+
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index ff6d373..8973bce 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -55,58 +55,6 @@ pkgconfig_DATA = $(pc_files)
 EXTRA_DIST += cogl2.pc.in
 DISTCLEANFILES += $(pc_files)
 
-# public api headers
-cogl_public_h = \
-       $(srcdir)/cogl-attribute-buffer.h       \
-       $(srcdir)/cogl-attribute.h              \
-       $(srcdir)/cogl-bitmap.h                 \
-       $(srcdir)/cogl-buffer.h                 \
-       $(srcdir)/cogl-clutter.h                \
-       $(srcdir)/cogl-color.h                  \
-       $(srcdir)/cogl-context.h                \
-       $(srcdir)/cogl-depth-state.h            \
-       $(srcdir)/cogl-display.h                \
-       $(srcdir)/cogl-error.h                  \
-       $(srcdir)/cogl-euler.h                  \
-       $(srcdir)/cogl-framebuffer.h            \
-       $(srcdir)/cogl-gles2-types.h            \
-       $(srcdir)/cogl-gles2.h                  \
-       $(srcdir)/cogl-index-buffer.h           \
-       $(srcdir)/cogl-indices.h                \
-       $(srcdir)/cogl-matrix.h                 \
-       $(srcdir)/cogl-meta-texture.h           \
-       $(srcdir)/cogl-object.h                 \
-       $(srcdir)/cogl-offscreen.h              \
-       $(srcdir)/cogl-onscreen-template.h      \
-       $(srcdir)/cogl-frame-info.h             \
-       $(srcdir)/cogl-onscreen.h               \
-       $(srcdir)/cogl-pipeline-layer-state.h   \
-       $(srcdir)/cogl-pipeline-state.h         \
-       $(srcdir)/cogl-pipeline.h               \
-       $(srcdir)/cogl-pixel-buffer.h           \
-       $(srcdir)/cogl-poll.h                   \
-       $(srcdir)/cogl-primitive-texture.h      \
-       $(srcdir)/cogl-primitive.h              \
-       $(srcdir)/cogl-output.h                 \
-       $(srcdir)/cogl-quaternion.h             \
-       $(srcdir)/cogl-matrix-stack.h           \
-       $(srcdir)/cogl-renderer.h               \
-       $(srcdir)/cogl-snippet.h                \
-       $(srcdir)/cogl-sub-texture.h            \
-       $(srcdir)/cogl-atlas-texture.h          \
-       $(srcdir)/cogl-texture-2d-gl.h          \
-       $(srcdir)/cogl-texture-2d-sliced.h      \
-       $(srcdir)/cogl-texture-2d.h             \
-       $(srcdir)/cogl-texture-3d.h             \
-       $(srcdir)/cogl-texture-rectangle.h      \
-       $(srcdir)/cogl-texture.h                \
-       $(srcdir)/cogl-types.h                  \
-       $(srcdir)/cogl-vector.h                 \
-       $(srcdir)/cogl-fence.h                  \
-       $(srcdir)/cogl-version.h                \
-       $(srcdir)/cogl.h                        \
-       $(NULL)
-
 # experimental api headers
 # Note: we don't run glib-mkenums or gobject introspection over these headers
 cogl_experimental_h = \
@@ -115,359 +63,71 @@ cogl_experimental_h = \
 cogl_nodist_experimental_h = \
        $(NULL)
 
-# nop driver
-cogl_driver_sources = \
-       $(srcdir)/driver/nop/cogl-driver-nop.c \
-       $(srcdir)/driver/nop/cogl-framebuffer-nop-private.h \
-       $(srcdir)/driver/nop/cogl-framebuffer-nop.c \
-       $(srcdir)/driver/nop/cogl-attribute-nop-private.h \
-       $(srcdir)/driver/nop/cogl-attribute-nop.c \
-       $(srcdir)/driver/nop/cogl-clip-stack-nop-private.h \
-       $(srcdir)/driver/nop/cogl-clip-stack-nop.c \
-       $(srcdir)/driver/nop/cogl-texture-2d-nop-private.h \
-       $(srcdir)/driver/nop/cogl-texture-2d-nop.c \
-       $(NULL)
-
-# gl driver sources
-cogl_gl_prototypes_h = \
-       $(srcdir)/gl-prototypes/cogl-gles2-functions.h          \
-       $(srcdir)/gl-prototypes/cogl-core-functions.h           \
-       $(srcdir)/gl-prototypes/cogl-in-gles-core-functions.h   \
-       $(srcdir)/gl-prototypes/cogl-in-gles2-core-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-glsl-functions.h           \
-       $(NULL)
 
-cogl_driver_sources += \
-       $(srcdir)/driver/gl/cogl-util-gl-private.h \
-       $(srcdir)/driver/gl/cogl-util-gl.c \
-       $(srcdir)/driver/gl/cogl-framebuffer-gl-private.h \
-       $(srcdir)/driver/gl/cogl-framebuffer-gl.c \
-       $(srcdir)/driver/gl/cogl-texture-gl-private.h \
-       $(srcdir)/driver/gl/cogl-texture-gl.c \
-       $(srcdir)/driver/gl/cogl-texture-2d-gl-private.h \
-       $(srcdir)/driver/gl/cogl-texture-2d-gl.c \
-       $(srcdir)/driver/gl/cogl-attribute-gl-private.h \
-       $(srcdir)/driver/gl/cogl-attribute-gl.c \
-       $(srcdir)/driver/gl/cogl-clip-stack-gl-private.h \
-       $(srcdir)/driver/gl/cogl-clip-stack-gl.c \
-       $(srcdir)/driver/gl/cogl-buffer-gl-private.h \
-       $(srcdir)/driver/gl/cogl-buffer-gl.c \
-       $(srcdir)/driver/gl/cogl-pipeline-opengl.c \
-       $(srcdir)/driver/gl/cogl-pipeline-opengl-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-fragend-glsl.c \
-       $(srcdir)/driver/gl/cogl-pipeline-fragend-glsl-private.h \
-       $(srcdir)/driver/gl/gl/cogl-pipeline-fragend-arbfp.c \
-       $(srcdir)/driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h \
-       $(srcdir)/driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c \
-       $(srcdir)/driver/gl/gl/cogl-pipeline-progend-fixed-arbfp-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-fragend-fixed.c \
-       $(srcdir)/driver/gl/cogl-pipeline-fragend-fixed-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-vertend-glsl.c \
-       $(srcdir)/driver/gl/cogl-pipeline-vertend-glsl-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-vertend-fixed.c \
-       $(srcdir)/driver/gl/cogl-pipeline-vertend-fixed-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-progend-fixed.c \
-       $(srcdir)/driver/gl/cogl-pipeline-progend-fixed-private.h \
-       $(srcdir)/driver/gl/cogl-pipeline-progend-glsl.c \
-       $(srcdir)/driver/gl/cogl-pipeline-progend-glsl-private.h \
-       $(NULL)
+include $(srcdir)/Makefile.sources
 
 if COGL_DRIVER_GL_SUPPORTED
-cogl_driver_sources += \
-       $(srcdir)/driver/gl/gl/cogl-driver-gl.c \
-       $(srcdir)/driver/gl/gl/cogl-texture-driver-gl.c \
-       $(NULL)
+cogl_sources_c += $(cogl_driver_gl_sources)
 endif
 
 if COGL_DRIVER_GLES_SUPPORTED
-cogl_driver_sources += \
-       $(srcdir)/driver/gl/gles/cogl-driver-gles.c \
-       $(srcdir)/driver/gl/gles/cogl-texture-driver-gles.c     \
-       $(NULL)
+cogl_sources_c += $(cogl_driver_gles_sources)
 endif
 
-# winsys sources, common to all backends
-cogl_winsys_common_sources = \
-       $(srcdir)/winsys/cogl-winsys-private.h \
-       $(srcdir)/winsys/cogl-winsys.c \
-       $(NULL)
-
-# sources
-cogl_sources_c = \
-       $(cogl_driver_sources)                          \
-       $(cogl_winsys_common_sources)                   \
-       $(srcdir)/cogl-private.h                        \
-       $(srcdir)/cogl-i18n-private.h                   \
-       $(srcdir)/cogl-debug.h                          \
-       $(srcdir)/cogl-debug-options.h                  \
-       $(srcdir)/cogl-gpu-info.c                       \
-       $(srcdir)/cogl-gpu-info-private.h               \
-       $(srcdir)/cogl-context-private.h                \
-       $(srcdir)/cogl-context.c                        \
-       $(srcdir)/cogl-renderer-private.h               \
-       $(srcdir)/cogl-renderer.h                       \
-       $(srcdir)/cogl-renderer.c                       \
-       $(srcdir)/cogl-onscreen-template-private.h      \
-       $(srcdir)/cogl-onscreen-template.h              \
-       $(srcdir)/cogl-onscreen-template.c              \
-       $(srcdir)/cogl-display-private.h                \
-       $(srcdir)/cogl-display.h                        \
-       $(srcdir)/cogl-display.c                        \
-       $(srcdir)/cogl-driver.h                         \
-       $(srcdir)/cogl.c                                \
-       $(srcdir)/cogl-object-private.h                 \
-       $(srcdir)/cogl-object.h                         \
-       $(srcdir)/cogl-object.c                         \
-       $(srcdir)/cogl-util.h                           \
-       $(srcdir)/cogl-util.c                           \
-       $(srcdir)/cogl-bitmap-private.h                 \
-       $(srcdir)/cogl-bitmap.c                         \
-       $(srcdir)/cogl-bitmap-conversion.c              \
-       $(srcdir)/cogl-bitmap-packing.h                 \
-       $(srcdir)/cogl-primitives-private.h             \
-       $(srcdir)/cogl-primitives.c                     \
-       $(srcdir)/cogl-bitmap-pixbuf.c                  \
-       $(srcdir)/cogl-clip-stack.h                     \
-       $(srcdir)/cogl-clip-stack.c                     \
-       $(srcdir)/cogl-feature-private.h                \
-       $(srcdir)/cogl-feature-private.c                \
-       $(srcdir)/cogl-color-private.h                  \
-       $(srcdir)/cogl-color.c                          \
-       $(srcdir)/cogl-buffer-private.h                 \
-       $(srcdir)/cogl-buffer.c                         \
-       $(srcdir)/cogl-pixel-buffer-private.h           \
-       $(srcdir)/cogl-pixel-buffer.c                   \
-       $(srcdir)/cogl-index-buffer-private.h           \
-       $(srcdir)/cogl-index-buffer.c                   \
-       $(srcdir)/cogl-attribute-buffer-private.h       \
-       $(srcdir)/cogl-attribute-buffer.c               \
-       $(srcdir)/cogl-indices-private.h                \
-       $(srcdir)/cogl-indices.c                        \
-       $(srcdir)/cogl-attribute-private.h              \
-       $(srcdir)/cogl-attribute.c                      \
-       $(srcdir)/cogl-primitive-private.h              \
-       $(srcdir)/cogl-primitive.c                      \
-       $(srcdir)/cogl-matrix.c                         \
-       $(srcdir)/cogl-vector.c                         \
-       $(srcdir)/cogl-euler.c                          \
-       $(srcdir)/cogl-quaternion-private.h             \
-       $(srcdir)/cogl-quaternion.c                     \
-       $(srcdir)/cogl-matrix-private.h                 \
-       $(srcdir)/cogl-matrix-stack.c                   \
-       $(srcdir)/cogl-matrix-stack-private.h           \
-       $(srcdir)/cogl-depth-state.c                    \
-       $(srcdir)/cogl-depth-state-private.h            \
-       $(srcdir)/cogl-node.c                           \
-       $(srcdir)/cogl-node-private.h                   \
-       $(srcdir)/cogl-pipeline.c                       \
-       $(srcdir)/cogl-pipeline-private.h               \
-       $(srcdir)/cogl-pipeline-layer.c                 \
-       $(srcdir)/cogl-pipeline-layer-private.h         \
-       $(srcdir)/cogl-pipeline-state.c                 \
-       $(srcdir)/cogl-pipeline-layer-state-private.h   \
-       $(srcdir)/cogl-pipeline-layer-state.c           \
-       $(srcdir)/cogl-pipeline-state-private.h         \
-       $(srcdir)/cogl-pipeline-debug.c                 \
-       $(srcdir)/cogl-glsl-shader.c                    \
-       $(srcdir)/cogl-glsl-shader-private.h            \
-       $(srcdir)/cogl-glsl-shader-boilerplate.h        \
-       $(srcdir)/cogl-pipeline-snippet-private.h       \
-       $(srcdir)/cogl-pipeline-snippet.c               \
-       $(srcdir)/cogl-pipeline-cache.h                 \
-       $(srcdir)/cogl-pipeline-cache.c                 \
-       $(srcdir)/cogl-pipeline-hash-table.h            \
-       $(srcdir)/cogl-pipeline-hash-table.c            \
-       $(srcdir)/cogl-sampler-cache.c                  \
-       $(srcdir)/cogl-sampler-cache-private.h          \
-       $(srcdir)/cogl-blend-string.c                   \
-       $(srcdir)/cogl-blend-string.h                   \
-       $(srcdir)/cogl-debug.c                          \
-       $(srcdir)/cogl-sub-texture-private.h            \
-       $(srcdir)/cogl-texture-private.h                \
-       $(srcdir)/cogl-texture-2d-private.h             \
-       $(srcdir)/cogl-texture-2d-sliced-private.h      \
-       $(srcdir)/cogl-texture-3d-private.h             \
-       $(srcdir)/cogl-texture-driver.h                 \
-       $(srcdir)/cogl-sub-texture.c                    \
-       $(srcdir)/cogl-texture.c                        \
-       $(srcdir)/cogl-texture-2d.c                     \
-       $(srcdir)/cogl-texture-2d-sliced.c              \
-       $(srcdir)/cogl-texture-3d.c                     \
-       $(srcdir)/cogl-texture-rectangle-private.h      \
-       $(srcdir)/cogl-texture-rectangle.c              \
-       $(srcdir)/cogl-rectangle-map.h                  \
-       $(srcdir)/cogl-rectangle-map.c                  \
-       $(srcdir)/cogl-atlas.h                          \
-       $(srcdir)/cogl-atlas.c                          \
-       $(srcdir)/cogl-atlas-texture-private.h          \
-       $(srcdir)/cogl-atlas-texture.c                  \
-       $(srcdir)/cogl-meta-texture.c                   \
-       $(srcdir)/cogl-primitive-texture.c              \
-       $(srcdir)/cogl-blit.h                           \
-       $(srcdir)/cogl-blit.c                           \
-       $(srcdir)/cogl-spans.h                          \
-       $(srcdir)/cogl-spans.c                          \
-       $(srcdir)/cogl-journal-private.h                \
-       $(srcdir)/cogl-journal.c                        \
-       $(srcdir)/cogl-frame-info-private.h             \
-       $(srcdir)/cogl-frame-info.c                     \
-       $(srcdir)/cogl-framebuffer-private.h            \
-       $(srcdir)/cogl-framebuffer.c                    \
-       $(srcdir)/cogl-onscreen-private.h               \
-       $(srcdir)/cogl-onscreen.c                       \
-       $(srcdir)/cogl-output-private.h                 \
-       $(srcdir)/cogl-output.c                         \
-       $(srcdir)/cogl-profile.h                        \
-       $(srcdir)/cogl-profile.c                        \
-       $(srcdir)/cogl-flags.h                          \
-       $(srcdir)/cogl-bitmask.h                        \
-       $(srcdir)/cogl-bitmask.c                        \
-       $(srcdir)/cogl-gtype-private.h                  \
-       $(srcdir)/cogl-point-in-poly-private.h          \
-       $(srcdir)/cogl-point-in-poly.c                  \
-       $(srcdir)/cogl-clutter.c                        \
-       $(srcdir)/cogl-list.c                           \
-       $(srcdir)/cogl-list.h                           \
-       $(srcdir)/winsys/cogl-winsys-stub-private.h     \
-       $(srcdir)/winsys/cogl-winsys-stub.c             \
-       $(srcdir)/cogl-config-private.h                 \
-       $(srcdir)/cogl-config.c                         \
-       $(srcdir)/cogl-boxed-value.h                    \
-       $(srcdir)/cogl-boxed-value.c                    \
-       $(srcdir)/cogl-snippet-private.h                \
-       $(srcdir)/cogl-snippet.c                        \
-       $(srcdir)/cogl-poll-private.h                   \
-       $(srcdir)/cogl-poll.c                           \
-       $(srcdir)/gl-prototypes/cogl-all-functions.h    \
-       $(srcdir)/gl-prototypes/cogl-gles1-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-gles2-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-core-functions.h   \
-       $(srcdir)/gl-prototypes/cogl-in-gles-core-functions.h   \
-       $(srcdir)/gl-prototypes/cogl-in-gles1-core-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-in-gles2-core-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-fixed-functions.h  \
-       $(srcdir)/gl-prototypes/cogl-glsl-functions.h   \
-       $(srcdir)/cogl-memory-stack-private.h           \
-       $(srcdir)/cogl-memory-stack.c                   \
-       $(srcdir)/cogl-magazine-private.h               \
-       $(srcdir)/cogl-magazine.c                       \
-       $(srcdir)/cogl-gles2-context-private.h          \
-       $(srcdir)/cogl-gles2-context.c                  \
-       $(srcdir)/cogl-error-private.h                  \
-       $(srcdir)/cogl-error.c                          \
-       $(srcdir)/cogl-closure-list-private.h           \
-       $(srcdir)/cogl-closure-list.c                   \
-       $(srcdir)/cogl-fence.c                          \
-       $(srcdir)/cogl-fence-private.h                  \
-       $(NULL)
-
 if USE_GLIB
-cogl_public_h += \
-       $(srcdir)/cogl-glib-source.h
-cogl_sources_c += \
-       $(srcdir)/cogl-glib-source.c
+cogl_public_h += $(cogl_glib_sources_h)
+cogl_sources_c += $(cogl_glib_sources_c)
 endif
 
 if SUPPORT_XLIB
-cogl_public_h += \
-       $(srcdir)/cogl-clutter-xlib.h \
-       $(srcdir)/cogl-xlib-renderer.h
-
-cogl_public_h += \
-       $(srcdir)/winsys/cogl-texture-pixmap-x11.h \
-       $(srcdir)/cogl-xlib.h
-
-cogl_sources_c += \
-       $(srcdir)/cogl-x11-renderer-private.h \
-       $(srcdir)/cogl-xlib-renderer-private.h \
-       $(srcdir)/cogl-xlib-renderer.c \
-       $(srcdir)/cogl-xlib.c \
-       $(srcdir)/cogl-xlib-private.h \
-       $(srcdir)/winsys/cogl-texture-pixmap-x11.c \
-       $(srcdir)/winsys/cogl-texture-pixmap-x11-private.h
+cogl_public_h += $(cogl_xlib_sources_h)
+cogl_sources_c += $(cogl_xlib_sources_c)
 endif
+
 if SUPPORT_GLX
-cogl_sources_c += \
-       $(srcdir)/cogl-glx-renderer-private.h \
-       $(srcdir)/cogl-glx-display-private.h \
-       $(srcdir)/winsys/cogl-winsys-glx-feature-functions.h \
-       $(srcdir)/winsys/cogl-winsys-glx-private.h \
-       $(srcdir)/winsys/cogl-winsys-glx.c
+cogl_sources_c += $(cogl_glx_sources_c)
 endif
+
 if SUPPORT_WGL
-cogl_public_h += \
-       $(srcdir)/cogl-win32-renderer.h
-
-cogl_sources_c += \
-       $(srcdir)/cogl-win32-renderer.c \
-       $(srcdir)/winsys/cogl-winsys-wgl-private.h \
-       $(srcdir)/winsys/cogl-winsys-wgl.c \
-       $(srcdir)/winsys/cogl-winsys-wgl-feature-functions.h
+cogl_public_h += $(cogl_wgl_sources_h)
+cogl_sources_c += $(cogl_wgl_sources_c)
 endif
+
 if SUPPORT_WAYLAND_EGL_SERVER
-cogl_experimental_h += \
-       $(srcdir)/cogl-wayland-server.h
+cogl_experimental_h += $(cogl_egl_wayland_server_sources_h)
 endif
 if SUPPORT_EGL_PLATFORM_WAYLAND
-cogl_experimental_h += \
-       $(srcdir)/cogl-wayland-renderer.h \
-       $(srcdir)/cogl-wayland-client.h
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-wayland.c \
-       $(srcdir)/winsys/cogl-winsys-egl-wayland-private.h
+cogl_experimental_h += $(cogl_egl_wayland_sources_h)
+cogl_sources_c += $(cogl_egl_wayland_sources_c)
 endif
 if SUPPORT_EGL_PLATFORM_KMS
-cogl_experimental_h += \
-       $(srcdir)/cogl-kms-renderer.h \
-       $(srcdir)/cogl-kms-display.h
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-kms.c \
-       $(srcdir)/winsys/cogl-winsys-egl-kms-private.h
+cogl_experimental_h += $(cogl_egl_kms_sources_h)
+cogl_sources_c += $(cogl_egl_kms_sources_c)
 endif
 if SUPPORT_EGL_PLATFORM_XLIB
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-x11.c \
-       $(srcdir)/winsys/cogl-winsys-egl-x11-private.h
+cogl_sources_c += $(cogl_egl_xlib_sources_c)
 endif
 if SUPPORT_EGL_PLATFORM_POWERVR_NULL
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-null.c \
-       $(srcdir)/winsys/cogl-winsys-egl-null-private.h
+cogl_sources_c += $(cogl_egl_powervr_null_sources_c)
 endif
 if SUPPORT_EGL_PLATFORM_GDL
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-gdl.c \
-       $(srcdir)/winsys/cogl-winsys-egl-gdl-private.h
+cogl_sources_c += $(cogl_egl_gdl_sources_c)
 endif
 if SUPPORT_EGL_PLATFORM_ANDROID
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl-android.c \
-       $(srcdir)/winsys/cogl-winsys-egl-android-private.h
+cogl_sources_c += $(cogl_egl_android_sources_c)
 endif
 if SUPPORT_EGL
-cogl_public_h += \
-       $(srcdir)/cogl-egl.h
-cogl_nodist_experimental_h += \
-       $(builddir)/cogl-egl-defines.h
-
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-egl.c \
-       $(srcdir)/winsys/cogl-winsys-egl-feature-functions.h \
-       $(srcdir)/winsys/cogl-winsys-egl-private.h
+cogl_public_h += $(cogl_egl_sources_h)
+cogl_nodist_experimental_h += $(builddir)/cogl-egl-defines.h
+cogl_sources_c += $(cogl_egl_sources_c)
 endif
 if SUPPORT_SDL
-cogl_public_h += $(srcdir)/cogl-sdl.h
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-sdl-private.h \
-       $(srcdir)/winsys/cogl-winsys-sdl.c \
-       $(srcdir)/cogl-sdl.c
+cogl_public_h += $(cogl_sdl_sources_h)
+cogl_sources_c += $(cogl_sdl_sources_c)
 endif
 if SUPPORT_SDL2
-cogl_experimental_h += $(srcdir)/cogl-sdl.h
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-sdl-private.h \
-       $(srcdir)/winsys/cogl-winsys-sdl2.c \
-       $(srcdir)/cogl-sdl.c
+cogl_experimental_h += $(cogl_sdl2_sources_h)
+cogl_sources_c += $(cogl_sdl2_sources_c)
 endif
 
 EXTRA_DIST += stb_image.c
diff --git a/cogl/Makefile.sources b/cogl/Makefile.sources
new file mode 100644
index 0000000..dedf408
--- /dev/null
+++ b/cogl/Makefile.sources
@@ -0,0 +1,367 @@
+# public api headers
+cogl_public_h = \
+       cogl-attribute-buffer.h         \
+       cogl-attribute.h                \
+       cogl-bitmap.h           \
+       cogl-buffer.h           \
+       cogl-clutter.h                  \
+       cogl-color.h                    \
+       cogl-context.h          \
+       cogl-depth-state.h              \
+       cogl-display.h          \
+       cogl-error.h                    \
+       cogl-euler.h                    \
+       cogl-framebuffer.h              \
+       cogl-gles2-types.h              \
+       cogl-gles2.h                    \
+       cogl-index-buffer.h             \
+       cogl-indices.h          \
+       cogl-matrix.h           \
+       cogl-meta-texture.h             \
+       cogl-object.h           \
+       cogl-offscreen.h                \
+       cogl-onscreen-template.h        \
+       cogl-frame-info.h               \
+       cogl-onscreen.h         \
+       cogl-pipeline-layer-state.h     \
+       cogl-pipeline-state.h   \
+       cogl-pipeline.h                 \
+       cogl-pixel-buffer.h             \
+       cogl-poll.h                     \
+       cogl-primitive-texture.h        \
+       cogl-primitive.h                \
+       cogl-output.h                   \
+       cogl-quaternion.h               \
+       cogl-matrix-stack.h             \
+       cogl-renderer.h                 \
+       cogl-snippet.h          \
+       cogl-sub-texture.h            \
+       cogl-atlas-texture.h          \
+       cogl-texture-2d-gl.h            \
+       cogl-texture-2d-sliced.h      \
+       cogl-texture-2d.h             \
+       cogl-texture-3d.h             \
+       cogl-texture-rectangle.h      \
+       cogl-texture.h          \
+       cogl-types.h                    \
+       cogl-vector.h           \
+       cogl-fence.h                    \
+       cogl-version.h          \
+       cogl.h
+
+# nop driver
+cogl_driver_sources = \
+       driver/nop/cogl-driver-nop.c \
+       driver/nop/cogl-framebuffer-nop-private.h \
+       driver/nop/cogl-framebuffer-nop.c \
+       driver/nop/cogl-attribute-nop-private.h \
+       driver/nop/cogl-attribute-nop.c \
+       driver/nop/cogl-clip-stack-nop-private.h \
+       driver/nop/cogl-clip-stack-nop.c \
+       driver/nop/cogl-texture-2d-nop-private.h \
+       driver/nop/cogl-texture-2d-nop.c
+
+# gl driver sources
+cogl_gl_prototypes_h = \
+       gl-prototypes/cogl-gles2-functions.h            \
+       gl-prototypes/cogl-core-functions.h             \
+       gl-prototypes/cogl-in-gles-core-functions.h     \
+       gl-prototypes/cogl-in-gles2-core-functions.h    \
+       gl-prototypes/cogl-glsl-functions.h
+
+cogl_driver_sources += \
+       driver/gl/cogl-util-gl-private.h \
+       driver/gl/cogl-util-gl.c \
+       driver/gl/cogl-framebuffer-gl-private.h \
+       driver/gl/cogl-framebuffer-gl.c \
+       driver/gl/cogl-texture-gl-private.h \
+       driver/gl/cogl-texture-gl.c \
+       driver/gl/cogl-texture-2d-gl-private.h \
+       driver/gl/cogl-texture-2d-gl.c \
+       driver/gl/cogl-attribute-gl-private.h \
+       driver/gl/cogl-attribute-gl.c \
+       driver/gl/cogl-clip-stack-gl-private.h \
+       driver/gl/cogl-clip-stack-gl.c \
+       driver/gl/cogl-buffer-gl-private.h \
+       driver/gl/cogl-buffer-gl.c \
+       driver/gl/cogl-pipeline-opengl.c \
+       driver/gl/cogl-pipeline-opengl-private.h \
+       driver/gl/cogl-pipeline-fragend-glsl.c \
+       driver/gl/cogl-pipeline-fragend-glsl-private.h \
+       driver/gl/gl/cogl-pipeline-fragend-arbfp.c \
+       driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h \
+       driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c \
+       driver/gl/gl/cogl-pipeline-progend-fixed-arbfp-private.h \
+       driver/gl/cogl-pipeline-fragend-fixed.c \
+       driver/gl/cogl-pipeline-fragend-fixed-private.h \
+       driver/gl/cogl-pipeline-vertend-glsl.c \
+       driver/gl/cogl-pipeline-vertend-glsl-private.h \
+       driver/gl/cogl-pipeline-vertend-fixed.c \
+       driver/gl/cogl-pipeline-vertend-fixed-private.h \
+       driver/gl/cogl-pipeline-progend-fixed.c \
+       driver/gl/cogl-pipeline-progend-fixed-private.h \
+       driver/gl/cogl-pipeline-progend-glsl.c \
+       driver/gl/cogl-pipeline-progend-glsl-private.h
+
+cogl_driver_gl_sources = \
+       driver/gl/gl/cogl-driver-gl.c \
+       driver/gl/gl/cogl-texture-driver-gl.c
+
+cogl_driver_gles_sources = \
+       driver/gl/gles/cogl-driver-gles.c \
+       driver/gl/gles/cogl-texture-driver-gles.c
+
+# winsys sources, common to all backends
+cogl_winsys_common_sources = \
+       winsys/cogl-winsys-private.h \
+       winsys/cogl-winsys.c
+
+# sources
+cogl_sources_c = \
+       $(cogl_driver_sources)                          \
+       $(cogl_winsys_common_sources)                   \
+       cogl-private.h                  \
+       cogl-i18n-private.h                     \
+       cogl-debug.h                            \
+       cogl-debug-options.h                    \
+       cogl-gpu-info.c                 \
+       cogl-gpu-info-private.h         \
+       cogl-context-private.h          \
+       cogl-context.c                  \
+       cogl-renderer-private.h         \
+       cogl-renderer.h                 \
+       cogl-renderer.c                 \
+       cogl-onscreen-template-private.h        \
+       cogl-onscreen-template.h                \
+       cogl-onscreen-template.c                \
+       cogl-display-private.h          \
+       cogl-display.h                  \
+       cogl-display.c                  \
+       cogl-driver.h                           \
+       cogl.c                          \
+       cogl-object-private.h                   \
+       cogl-object.h                           \
+       cogl-object.c                           \
+       cogl-util.h                             \
+       cogl-util.c                             \
+       cogl-bitmap-private.h           \
+       cogl-bitmap.c                   \
+       cogl-bitmap-conversion.c                \
+       cogl-bitmap-packing.h                   \
+       cogl-primitives-private.h               \
+       cogl-primitives.c                       \
+       cogl-bitmap-pixbuf.c                    \
+       cogl-clip-stack.h                       \
+       cogl-clip-stack.c                       \
+       cogl-feature-private.h                \
+       cogl-feature-private.c                \
+       cogl-color-private.h                    \
+       cogl-color.c                            \
+       cogl-buffer-private.h           \
+       cogl-buffer.c                           \
+       cogl-pixel-buffer-private.h             \
+       cogl-pixel-buffer.c                     \
+       cogl-index-buffer-private.h             \
+       cogl-index-buffer.c                     \
+       cogl-attribute-buffer-private.h \
+       cogl-attribute-buffer.c         \
+       cogl-indices-private.h          \
+       cogl-indices.c                  \
+       cogl-attribute-private.h                \
+       cogl-attribute.c                        \
+       cogl-primitive-private.h                \
+       cogl-primitive.c                        \
+       cogl-matrix.c                           \
+       cogl-vector.c                           \
+       cogl-euler.c                            \
+       cogl-quaternion-private.h               \
+       cogl-quaternion.c                       \
+       cogl-matrix-private.h                   \
+       cogl-matrix-stack.c                     \
+       cogl-matrix-stack-private.h             \
+       cogl-depth-state.c                      \
+       cogl-depth-state-private.h              \
+       cogl-node.c                             \
+       cogl-node-private.h                     \
+       cogl-pipeline.c                 \
+       cogl-pipeline-private.h         \
+       cogl-pipeline-layer.c                   \
+       cogl-pipeline-layer-private.h           \
+       cogl-pipeline-state.c                   \
+       cogl-pipeline-layer-state-private.h     \
+       cogl-pipeline-layer-state.c             \
+       cogl-pipeline-state-private.h           \
+       cogl-pipeline-debug.c                   \
+       cogl-glsl-shader.c                      \
+       cogl-glsl-shader-private.h              \
+       cogl-glsl-shader-boilerplate.h  \
+       cogl-pipeline-snippet-private.h \
+       cogl-pipeline-snippet.c         \
+       cogl-pipeline-cache.h                   \
+       cogl-pipeline-cache.c                   \
+       cogl-pipeline-hash-table.h              \
+       cogl-pipeline-hash-table.c              \
+       cogl-sampler-cache.c                    \
+       cogl-sampler-cache-private.h            \
+       cogl-blend-string.c                     \
+       cogl-blend-string.h                     \
+       cogl-debug.c                            \
+       cogl-sub-texture-private.h            \
+       cogl-texture-private.h          \
+       cogl-texture-2d-private.h             \
+       cogl-texture-2d-sliced-private.h        \
+       cogl-texture-3d-private.h             \
+       cogl-texture-driver.h                   \
+       cogl-sub-texture.c                    \
+       cogl-texture.c                  \
+       cogl-texture-2d.c                     \
+       cogl-texture-2d-sliced.c                \
+       cogl-texture-3d.c                     \
+       cogl-texture-rectangle-private.h      \
+       cogl-texture-rectangle.c              \
+       cogl-rectangle-map.h                  \
+       cogl-rectangle-map.c                  \
+       cogl-atlas.h                          \
+       cogl-atlas.c                          \
+       cogl-atlas-texture-private.h          \
+       cogl-atlas-texture.c                  \
+       cogl-meta-texture.c                     \
+       cogl-primitive-texture.c                \
+       cogl-blit.h                             \
+       cogl-blit.c                             \
+       cogl-spans.h                            \
+       cogl-spans.c                            \
+       cogl-journal-private.h          \
+       cogl-journal.c                  \
+       cogl-frame-info-private.h               \
+       cogl-frame-info.c                       \
+       cogl-framebuffer-private.h              \
+       cogl-framebuffer.c                      \
+       cogl-onscreen-private.h         \
+       cogl-onscreen.c                         \
+       cogl-output-private.h                   \
+       cogl-output.c                           \
+       cogl-profile.h                  \
+       cogl-profile.c                  \
+       cogl-flags.h                            \
+       cogl-bitmask.h                        \
+       cogl-bitmask.c                        \
+       cogl-gtype-private.h                  \
+       cogl-point-in-poly-private.h            \
+       cogl-point-in-poly.c                    \
+       cogl-clutter.c                          \
+       cogl-list.c                             \
+       cogl-list.h                             \
+       winsys/cogl-winsys-stub-private.h       \
+       winsys/cogl-winsys-stub.c               \
+       cogl-config-private.h                   \
+       cogl-config.c                           \
+       cogl-boxed-value.h                      \
+       cogl-boxed-value.c                      \
+       cogl-snippet-private.h          \
+       cogl-snippet.c                  \
+       cogl-poll-private.h                     \
+       cogl-poll.c                             \
+       gl-prototypes/cogl-all-functions.h      \
+       gl-prototypes/cogl-gles1-functions.h    \
+       gl-prototypes/cogl-gles2-functions.h    \
+       gl-prototypes/cogl-core-functions.h     \
+       gl-prototypes/cogl-in-gles-core-functions.h     \
+       gl-prototypes/cogl-in-gles1-core-functions.h    \
+       gl-prototypes/cogl-in-gles2-core-functions.h    \
+       gl-prototypes/cogl-fixed-functions.h    \
+       gl-prototypes/cogl-glsl-functions.h     \
+       cogl-memory-stack-private.h             \
+       cogl-memory-stack.c                     \
+       cogl-magazine-private.h         \
+       cogl-magazine.c                 \
+       cogl-gles2-context-private.h            \
+       cogl-gles2-context.c                    \
+       cogl-error-private.h                    \
+       cogl-error.c                            \
+       cogl-closure-list-private.h             \
+       cogl-closure-list.c                     \
+       cogl-fence.c                            \
+       cogl-fence-private.h
+
+cogl_glib_sources_h = cogl-glib-source.h
+cogl_glib_sources_c = cogl-glib-source.c
+
+cogl_xlib_sources_h = \
+       cogl-clutter-xlib.h \
+       cogl-xlib-renderer.h \
+       winsys/cogl-texture-pixmap-x11.h \
+       cogl-xlib.h
+cogl_xlib_sources_c = \
+       cogl-x11-renderer-private.h \
+       cogl-xlib-renderer-private.h \
+       cogl-xlib-renderer.c \
+       cogl-xlib.c \
+       cogl-xlib-private.h \
+       winsys/cogl-texture-pixmap-x11.c \
+       winsys/cogl-texture-pixmap-x11-private.h
+
+cogl_glx_sources_c = \
+       cogl-glx-renderer-private.h \
+       cogl-glx-display-private.h \
+       winsys/cogl-winsys-glx-feature-functions.h \
+       winsys/cogl-winsys-glx-private.h \
+       winsys/cogl-winsys-glx.c
+
+cogl_wgl_sources_h = cogl-win32-renderer.h
+cogl_wgl_sources_c = \
+       cogl-win32-renderer.c \
+       winsys/cogl-winsys-wgl-private.h \
+       winsys/cogl-winsys-wgl.c \
+       winsys/cogl-winsys-wgl-feature-functions.h
+
+cogl_egl_wayland_server_sources_h = \
+       cogl-wayland-server.h
+cogl_egl_wayland_sources_h = \
+       cogl-wayland-renderer.h \
+       cogl-wayland-client.h
+cogl_egl_wayland_sources_c = \
+       winsys/cogl-winsys-egl-wayland.c \
+       winsys/cogl-winsys-egl-wayland-private.h
+
+cogl_egl_kms_sources_h = \
+       cogl-kms-renderer.h \
+       cogl-kms-display.h
+cogl_egl_kms_sources_c = \
+       winsys/cogl-winsys-egl-kms.c \
+       winsys/cogl-winsys-egl-kms-private.h
+
+cogl_egl_xlib_sources_c = \
+       winsys/cogl-winsys-egl-x11.c \
+       winsys/cogl-winsys-egl-x11-private.h
+
+cogl_egl_powervr_null_sources_c = \
+       winsys/cogl-winsys-egl-null.c \
+       winsys/cogl-winsys-egl-null-private.h
+
+cogl_egl_gdl_sources_c = \
+       winsys/cogl-winsys-egl-gdl.c \
+       winsys/cogl-winsys-egl-gdl-private.h
+
+cogl_egl_android_sources_c = \
+       winsys/cogl-winsys-egl-android.c \
+       winsys/cogl-winsys-egl-android-private.h
+
+cogl_egl_sources_h = \
+       cogl-egl.h
+cogl_egl_sources_c = \
+       winsys/cogl-winsys-egl.c \
+       winsys/cogl-winsys-egl-feature-functions.h \
+       winsys/cogl-winsys-egl-private.h
+
+cogl_sdl_sources_h = cogl-sdl.h
+cogl_sdl_sources_c = \
+       winsys/cogl-winsys-sdl-private.h \
+       winsys/cogl-winsys-sdl.c \
+       cogl-sdl.c
+
+cogl_sdl2_sources_h = cogl-sdl.h
+cogl_sdl2_sources_c = \
+       winsys/cogl-winsys-sdl-private.h \
+       winsys/cogl-winsys-sdl2.c \
+       cogl-sdl.c
diff --git a/cogl/android/cogl/cogl-defines.h b/cogl/android/cogl/cogl-defines.h
new file mode 100644
index 0000000..0c18482
--- /dev/null
+++ b/cogl/android/cogl/cogl-defines.h
@@ -0,0 +1,53 @@
+/*
+ * Cogl
+ *
+ * A Low-Level GPU Graphics and Utilities API
+ *
+ * Copyright (C) 2007,2008,2009,2010 Intel Corporation.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ *
+ */
+
+#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
+#error "Only <cogl/cogl.h> can be included directly."
+#endif
+
+#ifndef __COGL_DEFINES_H__
+#define __COGL_DEFINES_H__
+
+#define COGL_SYSDEF_POLLIN 1
+#define COGL_SYSDEF_POLLPRI 2
+#define COGL_SYSDEF_POLLOUT 4
+#define COGL_SYSDEF_POLLERR 8
+#define COGL_SYSDEF_POLLHUP 16
+#define COGL_SYSDEF_POLLNVAL 32
+
+#define COGL_HAS_GLES2 1
+#define COGL_HAS_SDL_SUPPORT 1
+
+#define COGL_VERSION_MAJOR_INTERNAL 1
+#define COGL_VERSION_MINOR_INTERNAL 99
+#define COGL_VERSION_MICRO_INTERNAL 1
+#define COGL_VERSION_STRING_INTERNAL "1.99.1"
+
+#endif
diff --git a/deps/eglib/android/eglib-config.h b/deps/eglib/android/eglib-config.h
new file mode 100644
index 0000000..a3bf1a5
--- /dev/null
+++ b/deps/eglib/android/eglib-config.h
@@ -0,0 +1,15 @@
+#ifndef __EGLIB_CONFIG_H
+#define __EGLIB_CONFIG_H
+
+#define G_GNUC_PRETTY_FUNCTION
+#define G_SEARCHPATH_SEPARATOR_S ":"
+#define G_SEARCHPATH_SEPARATOR   ':'
+#define G_DIR_SEPARATOR          '/'
+#define G_DIR_SEPARATOR_S        "/"
+#define G_OS_UNIX
+
+#define G_HAVE_ALLOCA_H
+
+typedef int GPid;
+
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]