blob: acf0a82810057b5fb9e4ff7bf8fe33f418f36e72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
# 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) $(CAIRO_CFLAGS)
AM_LDFLAGS = $(CAIRO_LDFLAGS)
if OS_WIN32
export_symbols = -export-symbols cairo.def
cairo_def_dependency = cairo.def
endif
$(top_builddir)/config.h: $(top_srcdir)/config.h.in
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h
cairoincludedir = $(includedir)/cairo
cairoinclude_HEADERS = $(enabled_cairo_headers)
lib_LTLIBRARIES = libcairo.la
if BUILD_CXX
cairo_cxx_lib = libcairo_cxx.la
else
cairo_cxx_lib =
endif
noinst_LTLIBRARIES = $(cairo_cxx_lib)
libcairo_cxx_la_SOURCES = \
$(enabled_cairo_headers) \
$(enabled_cairo_private) \
$(enabled_cairo_cxx_sources) \
$(NULL)
libcairo_cxx_la_LDFLAGS = $(AM_LDFLAGS) $(export_symbols)
libcairo_cxx_la_LIBADD = $(CAIRO_LIBS)
libcairo_cxx_la_DEPENDENCIES = $(cairo_def_dependency)
libcairo_la_SOURCES = \
$(enabled_cairo_headers) \
$(enabled_cairo_private) \
$(enabled_cairo_sources) \
$(NULL)
libcairo_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
libcairo_la_LIBADD = $(CAIRO_LIBS) \
$(cairo_cxx_lib)
libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(cairo_cxx_lib)
# Special headers
cairoinclude_HEADERS += $(top_srcdir)/cairo-version.h
libcairo_la_SOURCES += cairo-version.h
nodist_cairoinclude_HEADERS = cairo-features.h
nodist_libcairo_la_SOURCES = cairo-features.h
BUILT_SOURCES += cairo-features.h cairo-supported-features.h
DISTCLEANFILES += cairo-features.h cairo-supported-features.h
cairo-features.h cairo-supported-features.h:
cd $(top_builddir) && ./config.status src/$@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(enabled_cairo_pkgconf)
CLEANFILES += cairo.def
cairo.def: cairo-features.h $(enabled_cairo_headers)
@echo Generating $@
@(echo EXPORTS; \
(cd $(srcdir); cat $(enabled_cairo_headers) || echo 'cairo_ERROR ()' ) | \
$(EGREP) -v '^# *include' | \
( cat cairo-features.h - | $(CPP) -D__cplusplus - || echo 'cairo_ERROR ()' ) | \
$(EGREP) '^cairo_.* \(' | \
sed -e 's/[ ].*//' | \
sort; \
echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \
) >$@
@ ! grep -q cairo_ERROR $@ || ($(RM) $@; false)
TESTS_ENVIRONMENT = \
srcdir="$(srcdir)" \
MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
all_cairo_files="$(all_cairo_files)" \
all_cairo_headers="$(all_cairo_headers)" \
all_cairo_private="$(all_cairo_private)" \
all_cairo_sources="$(all_cairo_sources)" \
enabled_cairo_headers="$(enabled_cairo_headers)" \
enabled_cairo_private="$(enabled_cairo_private)" \
enabled_cairo_sources="$(enabled_cairo_sources)" \
$(NULL)
TESTS_SH = \
check-def.sh \
check-doc-syntax.sh \
check-headers.sh \
check-plt.sh \
check-preprocessor-syntax.sh \
$(NULL)
TESTS += $(TESTS_SH)
if CROSS_COMPILING
else
TESTS += check-link$(EXEEXT)
endif
EXTRA_DIST += $(TESTS_SH) check-has-hidden-symbols.c check-doc-syntax.awk
check_PROGRAMS += check-link
check_link_LDADD = libcairo.la
check: headers-standalone
PREPROCESS_ARGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
COMPILE_ARGS = $(PREPROCESS_ARGS) $(AM_CFLAGS) $(CFLAGS)
# The pre-processed result is used by check-{def,plt}.sh to determine whether
# cairo has been compiled with symbol hiding.
.c.i: $(cairoinclude_HEADERS) $(nodist_cairoinclude_HEADERS) cairoint.h $(top_builddir)/config.h
$(CPP) $(PREPROCESS_ARGS) $< -o $@
.c.s: $(cairoinclude_HEADERS) $(nodist_cairoinclude_HEADERS) cairoint.h $(top_builddir)/config.h
$(CC) $(COMPILE_ARGS) $< -S -o $@
include $(srcdir)/Makefile.am.analysis
|