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