[build] Avoid adg-type-builtins.[ch] redundancy
[adg.git] / adg / Makefile.am
blob0445a759297a45212943cd9ff23e7795caad476d
1 MSG_GEN=                        echo '  GEN   '$@;
2 AM_CFLAGS=                      -I$(top_srcdir) \
3                                 -I$(top_builddir)
4 AM_LDFLAGS=
5 PATTERN=
8 # file groups
9 h_sources=                      adg-adim.h \
10                                 adg-alignment.h \
11                                 adg-arrow.h \
12                                 adg-canvas.h \
13                                 adg-color-style.h \
14                                 adg-container.h \
15                                 adg-dim.h \
16                                 adg-dim-style.h \
17                                 adg-dress.h \
18                                 adg-dress-builtins.h \
19                                 adg-edges.h \
20                                 adg-entity.h \
21                                 adg-fill-style.h \
22                                 adg-font-style.h \
23                                 adg-hatch.h \
24                                 adg-ldim.h \
25                                 adg-line-style.h \
26                                 adg-logo.h \
27                                 adg-marker.h \
28                                 adg-matrix.h \
29                                 adg-model.h \
30                                 adg-pair.h \
31                                 adg-path.h \
32                                 adg-pattern.h \
33                                 adg-point.h \
34                                 adg-primitive.h \
35                                 adg-projection.h \
36                                 adg-rdim.h \
37                                 adg-ruled-fill.h \
38                                 adg-segment.h \
39                                 adg-stroke.h \
40                                 adg-style.h \
41                                 adg-table.h \
42                                 adg-table-style.h \
43                                 adg-title-block.h \
44                                 adg-trail.h \
45                                 adg-toy-text.h \
46                                 adg-util.h
47 built_h_sources=                $(builddir)/adg-type-builtins.h \
48                                 $(builddir)/adg-marshal.h \
49                                 $(builddir)/adg.h
50 private_h_sources=              adg-adim-private.h \
51                                 adg-alignment-private.h \
52                                 adg-arrow-private.h \
53                                 adg-canvas-private.h \
54                                 adg-color-style-private.h \
55                                 adg-container-private.h \
56                                 adg-dim-private.h \
57                                 adg-dim-style-private.h \
58                                 adg-dress-private.h \
59                                 adg-edges-private.h \
60                                 adg-entity-private.h \
61                                 adg-enums.h \
62                                 adg-fill-style-private.h \
63                                 adg-font-style-private.h \
64                                 adg-hatch-private.h \
65                                 adg-intl.h \
66                                 adg-ldim-private.h \
67                                 adg-line-style-private.h \
68                                 adg-logo-private.h \
69                                 adg-marker-private.h \
70                                 adg-model-private.h \
71                                 adg-path-private.h \
72                                 adg-projection-private.h \
73                                 adg-rdim-private.h \
74                                 adg-ruled-fill-private.h \
75                                 adg-stroke-private.h \
76                                 adg-table-private.h \
77                                 adg-table-style-private.h \
78                                 adg-title-block-private.h \
79                                 adg-trail-private.h \
80                                 adg-toy-text-private.h
81 built_private_h_sources= 
82 c_sources=                      adg-adim.c \
83                                 adg-alignment.c \
84                                 adg-arrow.c \
85                                 adg-canvas.c \
86                                 adg-color-style.c \
87                                 adg-container.c \
88                                 adg-dim.c \
89                                 adg-dim-style.c \
90                                 adg-dress.c \
91                                 adg-dress-builtins.c \
92                                 adg-edges.c \
93                                 adg-entity.c \
94                                 adg-enums.c \
95                                 adg-fill-style.c \
96                                 adg-font-style.c \
97                                 adg-hatch.c \
98                                 adg-ldim.c \
99                                 adg-line-style.c \
100                                 adg-logo.c \
101                                 adg-marker.c \
102                                 adg-matrix.c \
103                                 adg-model.c \
104                                 adg-pair.c \
105                                 adg-path.c \
106                                 adg-pattern.c \
107                                 adg-point.c \
108                                 adg-primitive.c \
109                                 adg-projection.c \
110                                 adg-rdim.c \
111                                 adg-ruled-fill.c \
112                                 adg-segment.c \
113                                 adg-stroke.c \
114                                 adg-style.c \
115                                 adg-table.c \
116                                 adg-table-style.c \
117                                 adg-title-block.c \
118                                 adg-trail.c \
119                                 adg-toy-text.c \
120                                 adg-util.c
121 built_c_sources=                $(builddir)/adg-type-builtins.c \
122                                 $(builddir)/adg-marshal.c
123 EXTRA_DIST=                     adg-type-builtins.c.mkenums \
124                                 adg-type-builtins.h.mkenums \
125                                 adg-marshal.genmarshal \
126                                 adg.h.in
127 if HAVE_GTK2
128 AM_CFLAGS+=                     @GTK2_CFLAGS@
129 AM_LDFLAGS+=                    @GTK2_LIBS@
130 h_sources+=                     adg-widget.h
131 private_h_sources+=             adg-widget-private.h
132 c_sources+=                     adg-widget.c
133 PATTERN+=                       /\/\* if GTK2 \*\//d;/\/\* endif GTK2 \*\//d;
135 else
137 AM_CFLAGS+=                     @GOBJECT2_CFLAGS@ \
138                                 @CAIRO_CFLAGS@
139 AM_LDFLAGS+=                    @GOBJECT2_LIBS@ \
140                                 @GTK2_LIBS@
141 PATTERN+=                       /\/\* if GTK2 \*\//,/\/\* endif GTK2 \*\//d;
143 endif
146 # targets
147 BUILT_SOURCES=                  $(built_h_sources)
148 CLEANFILES=                     $(built_h_sources) \
149                                 $(built_private_h_sources) \
150                                 $(built_c_sources)
152 libadg_includedir=              $(includedir)/adg
153 libadg_include_DATA=            $(h_sources) \
154                                 $(built_h_sources)
156 lib_LTLIBRARIES=                libadg.la
157 libadg_la_LDFLAGS=              -release @PACKAGE_VERSION@
158 libadg_la_SOURCES=              $(h_sources) \
159                                 $(private_h_sources) \
160                                 $(c_sources)
161 nodist_libadg_la_SOURCES=       $(built_h_sources) \
162                                 $(built_private_h_sources) \
163                                 $(built_c_sources)
164 libadg_la_LIBADD=               $(top_builddir)/cpml/libcpml.la
165 libadg_la_DEPENDENCIES=         $(top_builddir)/cpml/libcpml.la
168 adg-type-builtins.c: adg-type-builtins.c.mkenums adg-enums.h
169 adg-type-builtins.h: adg-type-builtins.h.mkenums adg-enums.h
170         $(MSG_GEN)$(GLIB_MKENUMS) --template $^ > $@
172 adg-marshal.c: adg-marshal.genmarshal
173         $(MSG_GEN)$(GLIB_GENMARSHAL) --body --prefix=adg_marshal $< > $@
175 adg-marshal.h: adg-marshal.genmarshal
176         $(MSG_GEN)$(GLIB_GENMARSHAL) --header --prefix=adg_marshal $< > $@
178 # Regenerate the adg.h header file: forcing a dependency on config.log
179 # is an easy way to invalidate this file whenever a ./configure is recall
180 $(builddir)/adg.h: adg.h.in $(top_builddir)/config.log
181         $(MSG_GEN)rm -f $@.tmp
182         sed -e '$(PATTERN)' $< > $@.tmp
183         mv $@.tmp $@