c7152df1e02eba41457835e1bc479fdef8a8338c
[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.h            \
49         atkprivate.c            \
50         atkrange.c              \
51         atkregistry.c           \
52         atkrelation.c           \
53         atkrelationset.c        \
54         atkselection.c          \
55         atksocket.c             \
56         atkstate.c              \
57         atkstateset.c           \
58         atkstreamablecontent.c  \
59         atktable.c              \
60         atktablecell.c          \
61         atktext.c               \
62         atkutil.c               \
63         atkmisc.c               \
64         atkvalue.c              \
65         atkversion.c            \
66         atkwindow.c
67
68 libatk_1_0_la_SOURCES =         \
69         $(atk_sources)          \
70         atk-enum-types.c
71
72 libatkincludedir=$(includedir)/atk-1.0/atk
73
74 atk_headers = \
75         atkaction.h             \
76         atkcomponent.h          \
77         atkdocument.h           \
78         atkeditabletext.h       \
79         atkgobjectaccessible.h  \
80         atkhyperlink.h          \
81         atkhyperlinkimpl.h      \
82         atkhypertext.h          \
83         atknoopobject.h         \
84         atknoopobjectfactory.h  \
85         atkobject.h             \
86         atkobjectfactory.h      \
87         atkplug.h               \
88         atkimage.h              \
89         atkrange.h              \
90         atkregistry.h           \
91         atkrelation.h           \
92         atkrelationtype.h       \
93         atkrelationset.h        \
94         atkselection.h          \
95         atksocket.h             \
96         atkstate.h              \
97         atkstateset.h           \
98         atkstreamablecontent.h  \
99         atktable.h              \
100         atktablecell.h          \
101         atktext.h               \
102         atkutil.h               \
103         atkmisc.h               \
104         atkvalue.h \
105         atkwindow.h
106
107 libatkinclude_HEADERS =         \
108         atk.h                   \
109         $(atk_headers)          \
110         $(top_builddir)/atk/atkversion.h \
111         atk-enum-types.h
112
113
114 # ---------- Handle built sources ----------
115
116 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
117
118 atkmarshal.h: stamp-atkmarshal.h
119         @true
120 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
121         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
122         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
123         && rm -f xgen-gmh xgen-gmh~                                     \
124         && echo timestamp > $(@F)
125
126 atkmarshal.c: stamp-atkmarshal.c
127         @true
128 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
129         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
130         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
131         && rm -f xgen-gmc xgen-gmc~                                     \
132         && echo timestamp > $(@F)
133
134 atk-enum-types.h: s-enum-types-h
135         @true
136 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
137         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
138                         --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" \
139                         --fprod "/* enumerations from \"@filename@\" */\n" \
140                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
141                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
142                 $(atk_headers) ) > tmp-atk-enum-types.h \
143         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
144         && rm -f tmp-atk-enum-types.h \
145         && echo timestamp > $(@F)
146
147 atk-enum-types.c: s-enum-types-c
148         @true
149 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
150         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
151                         --fhead "#include <atk.h>" \
152                         --fprod "\n/* enumerations from \"@filename@\" */" \
153                         --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[] = {"     \
154                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
155                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
156                 $(atk_headers) ) > tmp-atk-enum-types.c \
157         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
158         && rm -f tmp-atk-enum-types.c \
159         && echo timestamp > $(@F)
160
161 # ---------- Win32 stuff ----------
162
163 if OS_WIN32
164 libatk_1_0_la_LDFLAGS += -export-symbols atk.def -no-undefined -Wl,atk-win32-res.o
165 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o atk.def
166
167 install-def-file:
168         $(INSTALL) atk.def $(DESTDIR)$(libdir)/atk-1.0.def
169 uninstall-def-file:
170         -rm $(DESTDIR)$(libdir)/atk-1.0.def
171 else
172 install-def-file:
173 uninstall-def-file:
174 endif
175
176 atk-win32-res.o: atk.rc
177         $(WINDRES) $< $@
178
179 if MS_LIB_AVAILABLE
180 noinst_DATA = atk-$(ATK_API_VERSION).lib
181
182 install-ms-lib:
183         $(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)
184
185 uninstall-ms-lib:
186         -rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).lib
187 else
188 install-ms-lib:
189 uninstall-ms-lib:
190 endif
191
192 atk.def: atk.symbols
193         (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
194
195 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
196         lib -machine:$(LIB_EXE_MACHINE_FLAG) -name:libatk-$(ATK_API_VERSION)-$(LT_CURRENT_MINUS_AGE).dll -def:atk.def -out:$@
197
198
199 EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atk.rc atkversion.h.in
200
201 DISTCLEANFILES = \
202   stamp-atkmarshal.h stamp-atkmarshal.c \
203   s-enum-types-h s-enum-types-c
204
205 distclean-local:
206         if test $(srcdir) = .; then :; else \
207           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
208         fi
209
210 install-data-local: install-ms-lib install-def-file
211
212 uninstall-local: uninstall-ms-lib uninstall-def-file