AtkValue: refactoring AtkValue
[platform/upstream/atk.git] / atk / Makefile.am
1 # We set GPATH here; this gives us semantics for GNU make
2 # which are more like other make's VPATH.
3 GPATH = $(srcdir)
4
5 include $(INTROSPECTION_MAKEFILE)
6 INTROSPECTION_GIRS =
7
8 CLEANFILES =
9
10 if PLATFORM_WIN32
11 no_undefined = -no-undefined
12 else
13 no_undefined =
14 endif
15
16 AM_CPPFLAGS = \
17         -I$(top_srcdir)         \
18         -DG_DISABLE_DEPRECATED  \
19         -DATK_DISABLE_DEPRECATED        \
20         -DATK_COMPILATION       \
21         -DATK_LOCALEDIR="\"$(datadir)/locale\"" \
22         $(DEP_CFLAGS)
23
24 lib_LTLIBRARIES = libatk-1.0.la
25
26 libatk_1_0_la_LDFLAGS =                         \
27         -version-info $(LT_VERSION_INFO)        \
28         $(no_undefined)
29 libatk_1_0_la_LIBADD = \
30        $(DEP_LIBS)     \
31        $(INTLLIBS)
32
33 atk_sources =   \
34         atkaction.c             \
35         atkcomponent.c          \
36         atkdocument.c           \
37         atkeditabletext.c       \
38         atkgobjectaccessible.c  \
39         atkhyperlink.c          \
40         atkhyperlinkimpl.c      \
41         atkhypertext.c          \
42         atkimage.c              \
43         atknoopobject.c         \
44         atknoopobjectfactory.c  \
45         atkobject.c             \
46         atkobjectfactory.c      \
47         atkplug.c               \
48         atkprivate.c            \
49         atkrange.c              \
50         atkregistry.c           \
51         atkrelation.c           \
52         atkrelationset.c        \
53         atkselection.c          \
54         atksocket.c             \
55         atkstate.c              \
56         atkstateset.c           \
57         atkstreamablecontent.c  \
58         atktable.c              \
59         atktablecell.c          \
60         atktext.c               \
61         atkutil.c               \
62         atkmisc.c               \
63         atkvalue.c              \
64         atkversion.c            \
65         atkwindow.c
66
67 libatk_1_0_la_SOURCES =         \
68         $(atk_sources)          \
69         atk-enum-types.c
70
71 libatkincludedir=$(includedir)/atk-1.0/atk
72
73 atk_headers = \
74         atkaction.h             \
75         atkcomponent.h          \
76         atkdocument.h           \
77         atkeditabletext.h       \
78         atkgobjectaccessible.h  \
79         atkhyperlink.h          \
80         atkhyperlinkimpl.h      \
81         atkhypertext.h          \
82         atknoopobject.h         \
83         atknoopobjectfactory.h  \
84         atkobject.h             \
85         atkobjectfactory.h      \
86         atkplug.h               \
87         atkimage.h              \
88         atkrange.h              \
89         atkregistry.h           \
90         atkrelation.h           \
91         atkrelationtype.h       \
92         atkrelationset.h        \
93         atkselection.h          \
94         atksocket.h             \
95         atkstate.h              \
96         atkstateset.h           \
97         atkstreamablecontent.h  \
98         atktable.h              \
99         atktablecell.h          \
100         atktext.h               \
101         atkutil.h               \
102         atkmisc.h               \
103         atkvalue.h \
104         atkwindow.h
105
106 libatkinclude_HEADERS =         \
107         atk.h                   \
108         $(atk_headers)          \
109         $(top_builddir)/atk/atkversion.h \
110         atk-enum-types.h
111
112
113 # ---------- Handle built sources ----------
114
115 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
116
117 atkmarshal.h: stamp-atkmarshal.h
118         @true
119 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
120         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
121         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
122         && rm -f xgen-gmh xgen-gmh~                                     \
123         && echo timestamp > $(@F)
124
125 atkmarshal.c: stamp-atkmarshal.c
126         @true
127 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
128         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
129         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
130         && rm -f xgen-gmc xgen-gmc~                                     \
131         && echo timestamp > $(@F)
132
133 atk-enum-types.h: s-enum-types-h
134         @true
135 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
136         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
137                         --fhead "#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)\n#error \"Only <atk/atk.h> can be included directly.\"\n#endif\n\n#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
138                         --fprod "/* enumerations from \"@filename@\" */\n" \
139                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
140                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
141                 $(atk_headers) ) > tmp-atk-enum-types.h \
142         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
143         && rm -f tmp-atk-enum-types.h \
144         && echo timestamp > $(@F)
145
146 atk-enum-types.c: s-enum-types-c
147         @true
148 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
149         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
150                         --fhead "#include <atk.h>" \
151                         --fprod "\n/* enumerations from \"@filename@\" */" \
152                         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
153                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
154                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
155                 $(atk_headers) ) > tmp-atk-enum-types.c \
156         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
157         && rm -f tmp-atk-enum-types.c \
158         && echo timestamp > $(@F)
159
160
161 if HAVE_INTROSPECTION
162 introspection_sources = \
163     $(atk_headers)      \
164     $(atk_sources)
165 introspection_generated_sources = \
166     $(top_builddir)/atk/atkversion.h    \
167     atk-enum-types.c    \
168     atk-enum-types.h
169
170 Atk-1.0.gir: libatk-1.0.la Makefile
171 Atk_1_0_gir_INCLUDES = GObject-2.0
172 Atk_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
173 Atk_1_0_gir_LIBS = libatk-1.0.la
174 Atk_1_0_gir_SCANNERFLAGS = --pkg-export atk --warn-all --c-include "atk/atk.h"
175 Atk_1_0_gir_FILES = \
176     $(addprefix $(srcdir)/, $(introspection_sources))   \
177     $(introspection_generated_sources)
178 INTROSPECTION_GIRS += Atk-1.0.gir
179
180 girdir = $(datadir)/gir-1.0
181 gir_DATA = $(INTROSPECTION_GIRS)
182
183 typelibsdir = $(libdir)/girepository-1.0
184 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
185
186 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
187 endif
188
189 # ---------- Win32 stuff ----------
190
191 if OS_WIN32
192 libatk_1_0_la_LDFLAGS += -export-symbols atk.def -no-undefined -Wl,atk-win32-res.o
193 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o atk.def
194
195 install-def-file:
196         $(INSTALL) atk.def $(DESTDIR)$(libdir)/atk-1.0.def
197 uninstall-def-file:
198         -rm $(DESTDIR)$(libdir)/atk-1.0.def
199 else
200 install-def-file:
201 uninstall-def-file:
202 endif
203
204 atk-win32-res.o: atk.rc
205         $(WINDRES) $< $@
206
207 if MS_LIB_AVAILABLE
208 noinst_DATA = atk-$(ATK_API_VERSION).lib
209
210 install-ms-lib:
211         $(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)
212
213 uninstall-ms-lib:
214         -rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).lib
215 else
216 install-ms-lib:
217 uninstall-ms-lib:
218 endif
219
220 atk.def: atk.symbols
221         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/atk.symbols | sed -e '/^$$/d' -e 's/^/    /' -e 's/G_GNUC_[^ ]*//g') > atk.def
222
223 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
224         lib -machine:$(LIB_EXE_MACHINE_FLAG) -name:libatk-$(ATK_API_VERSION)-$(LT_CURRENT_MINUS_AGE).dll -def:atk.def -out:$@
225
226
227 EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atk.rc atkversion.h.in
228
229 DISTCLEANFILES = \
230   stamp-atkmarshal.h stamp-atkmarshal.c \
231   s-enum-types-h s-enum-types-c
232
233 distclean-local:
234         if test $(srcdir) = .; then :; else \
235           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
236         fi
237
238 install-data-local: install-ms-lib install-def-file
239
240 uninstall-local: uninstall-ms-lib uninstall-def-file