atk/Makefile.am: Stop reading atk.def
[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         $(ATK_HIDDEN_VISIBILITY_CFLAGS)
24
25 lib_LTLIBRARIES = libatk-1.0.la
26
27 libatk_1_0_la_LDFLAGS =                         \
28         -version-info $(LT_VERSION_INFO)        \
29         $(no_undefined)
30 libatk_1_0_la_LIBADD = \
31        $(DEP_LIBS)     \
32        $(INTLLIBS)
33
34 atk_sources =   \
35         atkaction.c             \
36         atkcomponent.c          \
37         atkdocument.c           \
38         atkeditabletext.c       \
39         atkgobjectaccessible.c  \
40         atkhyperlink.c          \
41         atkhyperlinkimpl.c      \
42         atkhypertext.c          \
43         atkimage.c              \
44         atknoopobject.c         \
45         atknoopobjectfactory.c  \
46         atkobject.c             \
47         atkobjectfactory.c      \
48         atkplug.c               \
49         atkprivate.h            \
50         atkprivate.c            \
51         atkrange.c              \
52         atkregistry.c           \
53         atkrelation.c           \
54         atkrelationset.c        \
55         atkselection.c          \
56         atksocket.c             \
57         atkstate.c              \
58         atkstateset.c           \
59         atkstreamablecontent.c  \
60         atktable.c              \
61         atktablecell.c          \
62         atktext.c               \
63         atkutil.c               \
64         atkmisc.c               \
65         atkvalue.c              \
66         atkversion.c            \
67         atkwindow.c
68
69 libatk_1_0_la_SOURCES =         \
70         $(atk_sources)          \
71         atk-enum-types.c
72
73 libatkincludedir=$(includedir)/atk-1.0/atk
74
75 atk_headers = \
76         atkaction.h             \
77         atkcomponent.h          \
78         atkdocument.h           \
79         atkeditabletext.h       \
80         atkgobjectaccessible.h  \
81         atkhyperlink.h          \
82         atkhyperlinkimpl.h      \
83         atkhypertext.h          \
84         atknoopobject.h         \
85         atknoopobjectfactory.h  \
86         atkobject.h             \
87         atkobjectfactory.h      \
88         atkplug.h               \
89         atkimage.h              \
90         atkrange.h              \
91         atkregistry.h           \
92         atkrelation.h           \
93         atkrelationtype.h       \
94         atkrelationset.h        \
95         atkselection.h          \
96         atksocket.h             \
97         atkstate.h              \
98         atkstateset.h           \
99         atkstreamablecontent.h  \
100         atktable.h              \
101         atktablecell.h          \
102         atktext.h               \
103         atkutil.h               \
104         atkmisc.h               \
105         atkvalue.h \
106         atkwindow.h
107
108 libatkinclude_HEADERS =         \
109         atk.h                   \
110         $(atk_headers)          \
111         $(top_builddir)/atk/atkversion.h \
112         atk-enum-types.h
113
114
115 # ---------- Handle built sources ----------
116
117 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
118
119 atkmarshal.h: stamp-atkmarshal.h
120         @true
121 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
122         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
123         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
124         && rm -f xgen-gmh xgen-gmh~                                     \
125         && echo timestamp > $(@F)
126
127 atkmarshal.c: stamp-atkmarshal.c
128         @true
129 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
130         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
131         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
132         && rm -f xgen-gmc xgen-gmc~                                     \
133         && echo timestamp > $(@F)
134
135 atk-enum-types.h: s-enum-types-h
136         @true
137 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
138         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
139                         --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 <atk/atkversion.h>\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
140                         --fprod "/* enumerations from \"@filename@\" */\n" \
141                         --vhead "ATK_AVAILABLE_IN_ALL\nGType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
142                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
143                 $(atk_headers) ) > tmp-atk-enum-types.h \
144         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
145         && rm -f tmp-atk-enum-types.h \
146         && echo timestamp > $(@F)
147
148 atk-enum-types.c: s-enum-types-c
149         @true
150 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
151         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
152                         --fhead "#include \"config.h\"\n\n#include <atk.h>" \
153                         --fprod "\n/* enumerations from \"@filename@\" */" \
154                         --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[] = {"     \
155                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
156                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
157                 $(atk_headers) ) > tmp-atk-enum-types.c \
158         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
159         && rm -f tmp-atk-enum-types.c \
160         && echo timestamp > $(@F)
161
162
163 if HAVE_INTROSPECTION
164 introspection_sources = \
165     $(atk_headers)      \
166     $(atk_sources)
167 introspection_generated_sources = \
168     $(top_builddir)/atk/atkversion.h    \
169     atk-enum-types.c    \
170     atk-enum-types.h
171
172 Atk-1.0.gir: libatk-1.0.la Makefile
173 Atk_1_0_gir_INCLUDES = GObject-2.0
174 Atk_1_0_gir_CFLAGS = $(AM_CPPFLAGS) -I ..
175 Atk_1_0_gir_LIBS = libatk-1.0.la
176 Atk_1_0_gir_SCANNERFLAGS = --pkg-export atk --warn-all --c-include "atk/atk.h"
177 Atk_1_0_gir_FILES = \
178     $(addprefix $(srcdir)/, $(introspection_sources))   \
179     $(introspection_generated_sources)
180 INTROSPECTION_GIRS += Atk-1.0.gir
181
182 girdir = $(datadir)/gir-1.0
183 gir_DATA = $(INTROSPECTION_GIRS)
184
185 typelibsdir = $(libdir)/girepository-1.0
186 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
187
188 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
189 endif
190
191 # ---------- Win32 stuff ----------
192
193 if OS_WIN32
194 libatk_1_0_la_LDFLAGS += -no-undefined -Wl,atk-win32-res.o
195 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o
196 endif
197
198 atk-win32-res.o: atk.rc
199         $(WINDRES) $< $@
200
201 EXTRA_DIST = atk.rc.in atkmarshal.list atk.rc atkversion.h.in
202
203 DISTCLEANFILES = \
204   stamp-atkmarshal.h stamp-atkmarshal.c \
205   s-enum-types-h s-enum-types-c
206
207 distclean-local:
208         if test $(srcdir) = .; then :; else \
209           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
210         fi