1 # Note: All source files are listed in Makefile.sources.
3 include $(top_srcdir)/build/Makefile.am.common
4 include $(srcdir)/Makefile.am.features
6 EXTRA_DIST += Makefile.win32 Makefile.win32.features
7 MAINTAINERCLEANFILES += $(srcdir)/Makefile.win32.features
9 AM_CPPFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
12 export_symbols = -export-symbols cairo.def
13 cairo_def_dependency = cairo.def
16 EXTRA_DIST += cairo-supported-features.h
17 MAINTAINERCLEANFILES += cairo-supported-features.h
19 $(top_builddir)/config.h: $(top_srcdir)/config.h.in
20 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h
22 cairoincludedir = $(includedir)/cairo
23 noinst_HEADERS = $(enabled_cairo_headers)
25 noinst_LTLIBRARIES = libcairo.la
27 libcairo_la_SOURCES = \
28 $(enabled_cairo_headers) \
29 $(enabled_cairo_private) \
30 $(enabled_cairo_sources) \
32 libcairo_la_LDFLAGS = -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
33 libcairo_la_LIBADD = $(CAIRO_LIBS)
34 libcairo_la_DEPENDENCIES = $(cairo_def_dependency)
37 noinst_HEADERS += $(top_srcdir)/cairo-version.h
38 nodist_noinst_HEADERS = cairo-features.h
39 libcairo_la_SOURCES += cairo-version.h cairo-features.h
40 BUILT_SOURCES += cairo-features.h cairo-supported-features.h
41 cairo-features.h cairo-supported-features.h:
42 cd $(top_builddir) && ./config.status src/$@
44 pkgconfigdir = $(libdir)/pkgconfig
45 noinst_DATA = $(enabled_cairo_pkgconf)
47 CLEANFILES += cairo.def
48 cairo.def: cairo-features.h $(enabled_cairo_headers)
51 (cd $(srcdir); cat $(enabled_cairo_headers) || echo 'cairo_ERROR ()' ) | \
52 grep -v -E '^# *include' | \
53 ( cat cairo-features.h - | $(CPP) - || echo 'cairo_ERROR ()' ) | \
54 grep -E '^cairo_.* \(' | \
55 sed -e 's/[ ].*//' | \
57 echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \
59 @ ! grep -q cairo_ERROR $@ || ($(RM) $@; false)
61 #TESTS_ENVIRONMENT = \
62 # srcdir="$(srcdir)" \
63 # MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
64 # all_cairo_files="$(all_cairo_files)" \
65 # all_cairo_headers="$(all_cairo_headers)" \
66 # all_cairo_private="$(all_cairo_private)" \
67 # all_cairo_sources="$(all_cairo_sources)" \
68 # enabled_cairo_files="$(enabled_cairo_files)" \
69 # enabled_cairo_headers="$(enabled_cairo_headers)" \
70 # enabled_cairo_private="$(enabled_cairo_private)" \
71 # enabled_cairo_sources="$(enabled_cairo_sources)" \
75 # check-doc-syntax.sh\
78 # check-preprocessor-syntax.sh \
83 #TESTS += check-link$(EXEEXT)
86 EXTRA_DIST += $(TESTS_SH) check-has-hidden-symbols.c
87 check_PROGRAMS += check-link
88 check_link_LDADD = libcairo.la
90 check: headers-standalone
92 PREPROCESS_ARGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
93 COMPILE_ARGS = $(PREPROCESS_ARGS) $(AM_CFLAGS) $(CFLAGS)
95 # The pre-processed result is used by check-{def,plt}.sh to determine whether
96 # cairo has been compiled with symbol hiding.
97 .c.i: $(noinst_HEADERS) $(nodist_noinst_HEADERS) cairoint.h $(top_builddir)/config.h
98 $(CPP) $(PREPROCESS_ARGS) $< -o $@
100 include $(srcdir)/Makefile.am.analysis