2011-03-17 15:32:54 -04:00
|
|
|
include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|
|
|
|
2013-01-17 17:56:41 -05:00
|
|
|
AM_CPPFLAGS = \
|
2012-09-24 11:42:44 -04:00
|
|
|
-I$(top_srcdir)
|
|
|
|
|
|
|
|
if !USE_GLIB
|
2013-01-17 17:56:41 -05:00
|
|
|
AM_CPPFLAGS += -I$(top_builddir)/deps/glib
|
2012-09-24 11:42:44 -04:00
|
|
|
endif
|
2011-03-17 15:32:54 -04:00
|
|
|
|
|
|
|
AM_CFLAGS = \
|
|
|
|
$(COGL_DEP_CFLAGS) \
|
|
|
|
$(COGL_EXTRA_CFLAGS) \
|
2011-10-12 11:01:11 -04:00
|
|
|
-DCOGL_ENABLE_EXPERIMENTAL_2_0_API
|
|
|
|
|
|
|
|
if INSTALL_EXAMPLES
|
|
|
|
AM_CFLAGS += -DCOGL_EXAMPLES_DATA=\""$(pkgdatadir)/examples-data/"\"
|
|
|
|
else
|
|
|
|
AM_CFLAGS += -DCOGL_EXAMPLES_DATA=\""$(abs_top_srcdir)/examples/"\"
|
|
|
|
endif
|
2011-03-17 15:32:54 -04:00
|
|
|
|
|
|
|
common_ldadd = \
|
2011-06-15 09:52:21 -04:00
|
|
|
$(COGL_DEP_LIBS) \
|
2013-04-23 12:40:38 -04:00
|
|
|
$(top_builddir)/cogl/libcogl.la \
|
|
|
|
$(LIBM)
|
2011-03-17 15:32:54 -04:00
|
|
|
|
2012-09-24 11:42:44 -04:00
|
|
|
if !USE_GLIB
|
|
|
|
common_ldadd += $(top_builddir)/deps/glib/libglib.la
|
|
|
|
endif
|
|
|
|
|
2012-03-05 22:21:30 -05:00
|
|
|
programs = cogl-info
|
|
|
|
|
|
|
|
cogl_info_SOURCES = cogl-info.c
|
|
|
|
cogl_info_LDADD = $(common_ldadd)
|
|
|
|
|
|
|
|
if USE_GLIB
|
2013-08-21 04:25:12 -04:00
|
|
|
programs += cogl-hello cogl-msaa cogl-gles2-context cogl-point-sprites
|
2011-10-12 11:01:11 -04:00
|
|
|
examples_datadir = $(pkgdatadir)/examples-data
|
|
|
|
examples_data_DATA =
|
2011-03-17 15:32:54 -04:00
|
|
|
|
2011-10-12 11:01:11 -04:00
|
|
|
cogl_hello_SOURCES = cogl-hello.c
|
|
|
|
cogl_hello_LDADD = $(common_ldadd)
|
2011-08-23 09:47:35 -04:00
|
|
|
cogl_msaa_SOURCES = cogl-msaa.c
|
|
|
|
cogl_msaa_LDADD = $(common_ldadd)
|
2013-08-21 04:25:12 -04:00
|
|
|
cogl_point_sprites_SOURCES = cogl-point-sprites.c
|
|
|
|
cogl_point_sprites_LDADD = $(common_ldadd)
|
2011-03-17 15:32:54 -04:00
|
|
|
|
2011-05-11 11:37:09 -04:00
|
|
|
if BUILD_COGL_PANGO
|
2011-10-12 11:01:11 -04:00
|
|
|
programs += cogl-crate
|
|
|
|
cogl_crate_SOURCES = cogl-crate.c
|
|
|
|
cogl_crate_LDADD = $(common_ldadd) $(COGL_PANGO_DEP_LIBS) $(top_builddir)/cogl-pango/libcogl-pango.la
|
|
|
|
cogl_crate_CFLAGS = $(AM_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
|
|
|
|
examples_data_DATA += crate.jpg
|
2011-05-11 11:37:09 -04:00
|
|
|
endif
|
|
|
|
|
2013-02-22 09:56:05 -05:00
|
|
|
if BUILD_COGL_GST
|
|
|
|
programs += cogl-basic-video-player
|
|
|
|
cogl_basic_video_player_SOURCES = cogl-basic-video-player.c
|
|
|
|
cogl_basic_video_player_LDADD = $(common_ldadd) $(COGL_GST_DEP_LIBS) $(top_builddir)/cogl-gst/libcogl-gst.la
|
|
|
|
cogl_basic_video_player_CFLAGS = $(AM_CFLAGS) $(COGL_GST_DEP_CFLAGS) -I$(top_builddir)/cogl-gst
|
|
|
|
endif
|
|
|
|
|
2011-03-17 15:32:54 -04:00
|
|
|
if X11_TESTS
|
2011-10-12 11:01:11 -04:00
|
|
|
programs += cogl-x11-foreign cogl-x11-tfp
|
|
|
|
cogl_x11_foreign_SOURCES = cogl-x11-foreign.c
|
|
|
|
cogl_x11_foreign_LDADD = $(common_ldadd)
|
|
|
|
cogl_x11_tfp_SOURCES = cogl-x11-tfp.c
|
|
|
|
cogl_x11_tfp_LDADD = $(common_ldadd)
|
2011-03-17 15:32:54 -04:00
|
|
|
endif
|
2011-05-25 14:27:10 -04:00
|
|
|
|
|
|
|
if SUPPORT_WAYLAND_EGL_SERVER
|
2013-01-04 12:21:22 -05:00
|
|
|
# Note: Cogland currently only builds for Wayland 0.85
|
2011-10-12 11:01:11 -04:00
|
|
|
programs += cogland
|
2011-05-25 14:27:10 -04:00
|
|
|
cogland_SOURCES = cogland.c
|
|
|
|
cogland_LDADD = $(common_ldadd)
|
|
|
|
endif
|
2011-05-11 11:37:09 -04:00
|
|
|
|
2012-09-18 11:44:20 -04:00
|
|
|
cogl_gles2_context_SOURCES = cogl-gles2-context.c
|
|
|
|
cogl_gles2_context_LDADD = $(common_ldadd)
|
|
|
|
|
|
|
|
if BUILD_COGL_GLES2
|
|
|
|
programs += cogl-gles2-gears
|
|
|
|
cogl_gles2_gears_SOURCES = cogl-gles2-gears.c
|
|
|
|
cogl_gles2_gears_CFLAGS = -I$(top_srcdir)/cogl-gles2 $(AM_CFLAGS)
|
|
|
|
cogl_gles2_gears_LDADD = $(common_ldadd) $(top_builddir)/cogl-gles2/libcogl-gles2.la
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif #USE_GLIB
|
|
|
|
|
2013-04-27 21:42:24 -04:00
|
|
|
# XXX although emscripten "supports sdl" we can't build cogl-sdl-hello
|
|
|
|
# un-modified for emscripten since emscripten doesn't support
|
|
|
|
# SDL_WaitEvent() and we need to use some special emscripten apis
|
|
|
|
# to create a mainloop....
|
|
|
|
if USING_EMSCRIPTEN
|
|
|
|
|
|
|
|
programs += cogl-emscripten-hello
|
|
|
|
cogl_emscripten_hello_SOURCES = cogl-emscripten-hello.c
|
|
|
|
cogl_emscripten_hello_LDADD = $(common_ldadd)
|
|
|
|
|
|
|
|
else # USING_EMSCRIPTEN
|
|
|
|
|
2011-12-14 09:09:00 -05:00
|
|
|
if SUPPORT_SDL
|
|
|
|
programs += cogl-sdl-hello
|
|
|
|
cogl_sdl_hello_SOURCES = cogl-sdl-hello.c
|
|
|
|
cogl_sdl_hello_LDADD = $(common_ldadd)
|
|
|
|
endif
|
|
|
|
|
2013-04-27 21:42:24 -04:00
|
|
|
endif # USING_EMSCRIPTEN
|
|
|
|
|
2012-06-14 09:42:16 -04:00
|
|
|
if SUPPORT_SDL2
|
|
|
|
programs += cogl-sdl2-hello
|
|
|
|
cogl_sdl2_hello_SOURCES = cogl-sdl2-hello.c
|
|
|
|
cogl_sdl2_hello_LDADD = $(common_ldadd)
|
|
|
|
endif
|
|
|
|
|
2013-04-27 21:42:24 -04:00
|
|
|
if USING_EMSCRIPTEN
|
|
|
|
%.html: %.o $(top_builddir)/cogl/.libs/libcogl2.so $(top_builddir)/deps/glib/.libs/libglib.a
|
2013-05-13 08:28:15 -04:00
|
|
|
$(CC) $(AM_CFLAGS) $(CFLAGS) --js-library $(top_srcdir)/examples/emscripten-example-js-library.js -o $@ $^
|
2013-04-27 21:42:24 -04:00
|
|
|
|
|
|
|
all-local: $(addsuffix .html, $(programs))
|
|
|
|
endif
|
2012-03-05 22:21:30 -05:00
|
|
|
|
2011-10-12 11:01:11 -04:00
|
|
|
if INSTALL_EXAMPLES
|
|
|
|
bin_PROGRAMS = $(programs)
|
|
|
|
else
|
|
|
|
noinst_PROGRAMS = $(programs)
|
|
|
|
endif
|
|
|
|
|
2011-08-12 12:27:07 -04:00
|
|
|
EXTRA_DIST = \
|
2011-10-18 11:42:07 -04:00
|
|
|
crate.jpg \
|
2011-08-12 12:27:07 -04:00
|
|
|
android/hello/AndroidManifest.xml \
|
|
|
|
android/hello/jni/Application.mk \
|
|
|
|
android/hello/jni/Android.mk \
|
|
|
|
android/hello/jni/main.c \
|
|
|
|
android/hello/res/values/strings.xml \
|
|
|
|
android/hello/.gitignore \
|
|
|
|
android/hello/build.xml
|
|
|
|
|