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