BGO#638924: Add AtkWindow
[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 INCLUDES = \
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         atkregistry.c           \
49         atkrelation.c           \
50         atkrelationset.c        \
51         atkselection.c          \
52         atksocket.c             \
53         atkstate.c              \
54         atkstateset.c           \
55         atkstreamablecontent.c  \
56         atktable.c              \
57         atktext.c               \
58         atkutil.c               \
59         atkmisc.c               \
60         atkvalue.c \
61         atkwindow.c
62
63 libatk_1_0_la_SOURCES =         \
64         $(atk_sources)          \
65         atk-enum-types.c
66
67 libatkincludedir=$(includedir)/atk-1.0/atk
68
69 atk_headers = \
70         atk.h                   \
71         atkaction.h             \
72         atkcomponent.h          \
73         atkdocument.h           \
74         atkeditabletext.h       \
75         atkgobjectaccessible.h  \
76         atkhyperlink.h          \
77         atkhyperlinkimpl.h      \
78         atkhypertext.h          \
79         atknoopobject.h         \
80         atknoopobjectfactory.h  \
81         atkobject.h             \
82         atkobjectfactory.h      \
83         atkplug.h               \
84         atkimage.h              \
85         atkregistry.h           \
86         atkrelation.h           \
87         atkrelationtype.h       \
88         atkrelationset.h        \
89         atkselection.h          \
90         atksocket.h             \
91         atkstate.h              \
92         atkstateset.h           \
93         atkstreamablecontent.h  \
94         atktable.h              \
95         atktext.h               \
96         atkutil.h               \
97         atkmisc.h               \
98         atkvalue.h \
99         atkwindow.h
100
101 libatkinclude_HEADERS =         \
102         $(atk_headers)          \
103         atk-enum-types.h
104
105
106 # ---------- Handle built sources ----------
107
108 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
109
110 atkmarshal.h: stamp-atkmarshal.h
111         @true
112 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
113         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
114         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
115         && rm -f xgen-gmh xgen-gmh~                                     \
116         && echo timestamp > $(@F)
117
118 atkmarshal.c: stamp-atkmarshal.c
119         @true
120 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
121         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
122         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
123         && rm -f xgen-gmc xgen-gmc~                                     \
124         && echo timestamp > $(@F)
125
126 atk-enum-types.h: s-enum-types-h
127         @true
128 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
129         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
130                         --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" \
131                         --fprod "/* enumerations from \"@filename@\" */\n" \
132                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
133                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
134                 $(atk_headers) ) > tmp-atk-enum-types.h \
135         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
136         && rm -f tmp-atk-enum-types.h \
137         && echo timestamp > $(@F)
138
139 atk-enum-types.c: s-enum-types-c
140         @true
141 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
142         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
143                         --fhead "#include <atk.h>" \
144                         --fprod "\n/* enumerations from \"@filename@\" */" \
145                         --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[] = {"     \
146                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
147                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
148                 $(atk_headers) ) > tmp-atk-enum-types.c \
149         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
150         && rm -f tmp-atk-enum-types.c \
151         && echo timestamp > $(@F)
152
153
154 if HAVE_INTROSPECTION
155 introspection_sources = \
156     $(atk_headers)      \
157     $(atk_sources)
158 introspection_generated_sources = \
159     atk-enum-types.c    \
160     atk-enum-types.h
161
162 Atk-1.0.gir: libatk-1.0.la Makefile
163 Atk_1_0_gir_INCLUDES = GObject-2.0
164 Atk_1_0_gir_CFLAGS = $(INCLUDES)
165 Atk_1_0_gir_LIBS = libatk-1.0.la
166 Atk_1_0_gir_SCANNERFLAGS = --pkg-export atk --warn-all
167 Atk_1_0_gir_FILES = \
168     $(addprefix $(srcdir)/, $(introspection_sources))   \
169     $(introspection_generated_sources)
170 INTROSPECTION_GIRS += Atk-1.0.gir
171
172 girdir = $(datadir)/gir-1.0
173 gir_DATA = $(INTROSPECTION_GIRS)
174
175 typelibsdir = $(libdir)/girepository-1.0
176 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
177
178 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
179 endif
180
181 # ---------- Win32 stuff ----------
182
183 if OS_WIN32
184 libatk_1_0_la_LDFLAGS += -export-symbols atk.def -no-undefined -Wl,atk-win32-res.o
185 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o atk.def
186
187 install-def-file:
188         $(INSTALL) atk.def $(DESTDIR)$(libdir)/atk-1.0.def
189 uninstall-def-file:
190         -rm $(DESTDIR)$(libdir)/atk-1.0.def
191 else
192 install-def-file:
193 uninstall-def-file:
194 endif
195
196 atk-win32-res.o: atk.rc
197         $(WINDRES) $< $@
198
199 if MS_LIB_AVAILABLE
200 noinst_DATA = atk-$(ATK_API_VERSION).lib
201
202 install-ms-lib:
203         $(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)
204
205 uninstall-ms-lib:
206         -rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).lib
207 else
208 install-ms-lib:
209 uninstall-ms-lib:
210 endif
211
212 atk.def: atk.symbols
213         (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
214
215 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
216         lib -machine:$(LIB_EXE_MACHINE_FLAG) -name:libatk-$(ATK_API_VERSION)-$(LT_CURRENT_MINUS_AGE).dll -def:atk.def -out:$@
217
218
219 EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atkintl.h atk.rc
220
221 dist-hook: ../build/win32/vs9/atk.vcproj ../build/win32/vs10/atk.vcxproj ../build/win32/vs10/atk.vcxproj.filters
222
223 ../build/win32/vs9/atk.vcproj: ../build/win32/vs9/atk.vcprojin
224         for F in $(libatk_1_0_la_SOURCES); do \
225                 case $$F in \
226                 *.c) echo '   <File RelativePath="..\..\..\atk\'$$F'" />' \
227                      ;; \
228                 esac; \
229         done >libatk.sourcefiles
230         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/atk.vcprojin >$@
231         rm libatk.sourcefiles
232         
233 ../build/win32/vs10/atk.vcxproj: ../build/win32/vs10/atk.vcxprojin
234         for F in $(libatk_1_0_la_SOURCES); do \
235                 case $$F in \
236                 *.c) echo '    <ClCompile Include="..\..\..\atk\'$$F'" />' \
237                      ;; \
238                 esac; \
239         done >libatk.vs10.sourcefiles
240         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/atk.vcxprojin >$@
241         rm libatk.vs10.sourcefiles
242         
243 ../build/win32/vs10/atk.vcxproj.filters: ../build/win32/vs10/atk.vcxproj.filtersin
244         for F in $(libatk_1_0_la_SOURCES); do \
245                 case $$F in \
246                 *.c) echo '    <ClCompile Include="..\..\..\atk\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
247                      ;; \
248                 esac; \
249         done >libatk.vs10.sourcefiles.filters
250         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/atk.vcxproj.filtersin >$@
251         rm libatk.vs10.sourcefiles.filters
252
253 DISTCLEANFILES = \
254   stamp-atkmarshal.h stamp-atkmarshal.c \
255   s-enum-types-h s-enum-types-c
256
257 distclean-local:
258         if test $(srcdir) = .; then :; else \
259           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
260         fi
261
262 install-data-local: install-ms-lib install-def-file
263
264 uninstall-local: uninstall-ms-lib uninstall-def-file