cairo/boilerplate/Makefile.am
Chris Wilson 88cb69b10c [boilerpate] Move target definition to backends.
By moving the backend target definition out of the massive amlagamated
block in cairo-boilerplate.c and into each of the
cairo-boilerplate-backend.c, we make it much easier to add new targets as
the information need only be entered in a single file and not scattered
across three. However, updating the target interface means trawling across
all the files -- except given that I found it difficult maintaining the
single massive array I do not see this as an increase in the maintenance
burden.
2009-07-04 21:43:27 +01:00

70 lines
2 KiB
Makefile

# Note: All source files are listed in Makefile.sources.
include $(top_srcdir)/build/Makefile.am.common
include $(srcdir)/Makefile.am.features
EXTRA_DIST += Makefile.win32 Makefile.win32.features
#MAINTAINERCLEANFILES += $(srcdir)/Makefile.win32.features
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
$(CAIRO_CFLAGS) \
$(NULL)
AM_LDFLAGS = $(CAIRO_LDFLAGS)
EXTRA_LTLIBRARIES += libcairoboilerplate.la
libcairoboilerplate_la_SOURCES = \
$(enabled_cairo_boilerplate_headers) \
$(enabled_cairo_boilerplate_private) \
$(enabled_cairo_boilerplate_sources) \
cairo-boilerplate-constructors.c \
$(NULL)
libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la
if CAIRO_HAS_BEOS_SURFACE
# BeOS system headers trigger this warning
AM_CPPFLAGS += -Wno-multichar
endif
if CAIRO_CAN_TEST_GLITZ_AGL_SURFACE
libcairoboilerplate_la_LIBADD += $(GLITZ_AGL_LIBS)
endif
if CAIRO_CAN_TEST_GLITZ_EGL_SURFACE
libcairoboilerplate_la_LIBADD += $(GLITZ_EGL_LIBS)
endif
if CAIRO_CAN_TEST_GLITZ_GLX_SURFACE
libcairoboilerplate_la_LIBADD += $(GLITZ_GLX_LIBS)
endif
if CAIRO_CAN_TEST_GLITZ_WGL_SURFACE
libcairoboilerplate_la_LIBADD += $(GLITZ_WGL_LIBS)
endif
if CAIRO_HAS_WIN32_SURFACE
libcairoboilerplate_la_LIBADD += -lwinspool
endif
libcairoboilerplate_la_LIBADD += $(CAIROBOILERPLATE_LIBS)
make-cairo-boilerplate-constructors$(EXEEXT): make-cairo-boilerplate-constructors.c
$(CC) -o $@ make-cairo-boilerplate-constructors.c
cairo-boilerplate-constructors.c: Makefile $(enabled_cairo_boilerplate_sources) make-cairo-boilerplate-constructors$(EXEEXT)
(cd $(srcdir) && ./make-cairo-boilerplate-constructors$(EXEEXT) $(enabled_cairo_boilerplate_sources)) > $@
BUILT_SOURCES += cairo-boilerplate-constructors.c
EXTRA_DIST += $(BUILT_SOURCES)
CLEANFILES += $(BUILT_SOURCES)
CLEANFILES += make-cairo-boilerplate-constructors
test: check
if CROSS_COMPILING
else
TESTS += check-link$(EXEEXT)
endif
check_PROGRAMS += check-link
check_link_LDADD = libcairoboilerplate.la