build: directly avoid SUBDIRS on no tests
[adg.git] / src / cpml / Makefile.am
blob7b418b9a92512a10741d46c365e48ef37a021d19
1 include $(top_srcdir)/build/Makefile.am.common
4 if HAVE_TEST_FRAMEWORK
5 SUBDIRS=                        tests
6 endif
9 AM_CFLAGS=                      $(CPML_CFLAGS)
10 AM_CPPFLAGS=                    -I$(top_srcdir)/src \
11                                 -I$(top_builddir)/src
14 # file groups
15 h_sources=                      cpml-arc.h \
16                                 cpml-curve.h \
17                                 cpml-extents.h \
18                                 cpml-pair.h \
19                                 cpml-primitive.h \
20                                 cpml-segment.h \
21                                 cpml-utils.h
22 built_h_sources=
23 private_h_sources=              cpml-internal.h \
24                                 cpml-primitive-private.h
25 built_private_h_sources=
26 c_sources=                      cpml-arc.c \
27                                 cpml-curve.c \
28                                 cpml-extents.c \
29                                 cpml-line.c \
30                                 cpml-pair.c \
31                                 cpml-primitive.c \
32                                 cpml-segment.c \
33                                 cpml-utils.c
34 built_c_sources=
35 EXTRA_DIST=                     cpml-introspection.h \
36                                 cpml-1.pc.in
38 # targets
39 BUILT_SOURCES=                  $(built_h_sources) \
40                                 $(built_private_h_sources) \
41                                 $(built_c_sources)
42 CLEANFILES=                     $(built_h_sources) \
43                                 $(built_private_h_sources) \
44                                 $(built_c_sources)
46 pkgconfig_DATA=                 cpml-1.pc
48 cpml_includedir=                $(includedir)/adg-1/cpml
49 cpml_include_DATA=              $(h_sources) \
50                                 $(built_h_sources)
52 lib_LTLIBRARIES=                libcpml-1.la
53 libcpml_1_la_SOURCES=           $(h_sources) \
54                                 $(private_h_sources) \
55                                 $(c_sources)
56 nodist_libcpml_1_la_SOURCES=    $(built_h_sources) \
57                                 $(built_private_h_sources) \
58                                 $(built_c_sources)
59 libcpml_1_la_LDFLAGS=           -no-undefined \
60                                 -version-info $(CPML_LT_VERSION)
61 libcpml_1_la_LIBADD=            $(CPML_LIBS)
64 ## GObject introspection
66 -include $(INTROSPECTION_MAKEFILE)
67 INTROSPECTION_GIRS=
68 INTROSPECTION_SCANNER_ARGS=
69 INTROSPECTION_COMPILER_ARGS=
71 if HAVE_INTROSPECTION
73 Cpml-1.0.gir: libcpml-1.la
75 INTROSPECTION_GIRS+=            Cpml-1.0.gir
76 Cpml_1_0_gir_LIBS=              libcpml-1.la
77 Cpml_1_0_gir_INCLUDES=          cairo-1.0
78 Cpml_1_0_gir_FILES=             cpml-introspection.h \
79                                 $(h_sources) \
80                                 $(c_sources)
81 Cpml_1_0_gir_SCANNERFLAGS=      $(AM_CPPFLAGS) \
82                                 --c-include="cpml.h" \
83                                 --warn-all
84 girdir=                         $(GIRDIR)
85 dist_gir_DATA=                  $(INTROSPECTION_GIRS)
86 typelibdir=                     $(TYPELIBDIR)
87 typelib_DATA=                   $(INTROSPECTION_GIRS:.gir=.typelib)
88 CLEANFILES+=                    $(dist_gir_DATA) \
89                                 $(typelib_DATA)
91 endif
94 # Although actually GObject wrappers are always compiled,
95 # this feature can be easily made optional if needed.
97 h_sources+=                     cpml-gobject.h
98 c_sources+=                     cpml-gobject.c
101 coverage:
102         $(GCOV) $(srcdir)/*.c -s $(srcdir) -o .libs
104 # Possibly remove files created by 'make coverage'
105 mostlyclean-local:
106         -rm -f *.gcov
108 .PHONY: coverage