Fix for #418194. use -DATK_LOCALEDIR. remove AM_GLIB_DEFINE_LOCALEDIR.
[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 if PLATFORM_WIN32
6 no_undefined = -no-undefined
7 else
8 no_undefined =
9 endif
10
11 INCLUDES = \
12         -I$(top_srcdir)         \
13         -DG_DISABLE_DEPRECATED  \
14         -DATK_LOCALEDIR="\"$(datadir)/locale\"" \
15         $(DEP_CFLAGS)
16
17 lib_LTLIBRARIES = libatk-1.0.la
18
19 libatk_1_0_la_LDFLAGS =                         \
20         -version-info $(LT_VERSION_INFO)        \
21         $(no_undefined)
22 libatk_1_0_la_LIBADD = $(DEP_LIBS)
23
24 libatk_1_0_la_SOURCES =         \
25         atkaction.c             \
26         atkcomponent.c          \
27         atkdocument.c           \
28         atkeditabletext.c       \
29         atkgobjectaccessible.c  \
30         atkhyperlink.c          \
31         atkhyperlinkimpl.c      \
32         atkhypertext.c          \
33         atkimage.c              \
34         atknoopobject.c         \
35         atknoopobjectfactory.c  \
36         atkobject.c             \
37         atkobjectfactory.c      \
38         atkregistry.c           \
39         atkrelation.c           \
40         atkrelationset.c        \
41         atkselection.c          \
42         atkstate.c              \
43         atkstateset.c           \
44         atkstreamablecontent.c  \
45         atktable.c              \
46         atktext.c               \
47         atkutil.c               \
48         atkmisc.c               \
49         atkvalue.c              \
50         atk-enum-types.c
51
52 libatkincludedir=$(includedir)/atk-1.0/atk
53
54 atk_headers = \
55         atk.h                   \
56         atkaction.h             \
57         atkcomponent.h          \
58         atkdocument.h           \
59         atkeditabletext.h       \
60         atkgobjectaccessible.h  \
61         atkhyperlink.h          \
62         atkhyperlinkimpl.h      \
63         atkhypertext.h          \
64         atknoopobject.h         \
65         atknoopobjectfactory.h  \
66         atkobject.h             \
67         atkobjectfactory.h      \
68         atkimage.h              \
69         atkregistry.h           \
70         atkrelation.h           \
71         atkrelationtype.h       \
72         atkrelationset.h        \
73         atkselection.h          \
74         atkstate.h              \
75         atkstateset.h           \
76         atkstreamablecontent.h  \
77         atktable.h              \
78         atktext.h               \
79         atkutil.h               \
80         atkmisc.h               \
81         atkvalue.h
82
83 libatkinclude_HEADERS =         \
84         $(atk_headers)          \
85         atk-enum-types.h
86
87
88 # ---------- Handle built sources ----------
89
90 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
91
92 atkmarshal.h: stamp-atkmarshal.h
93         @true
94 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
95         $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
96         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
97         && rm -f xgen-gmh xgen-gmh~                                     \
98         && echo timestamp > $(@F)
99
100 atkmarshal.c: stamp-atkmarshal.c
101         @true
102 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
103         $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
104         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
105         && rm -f xgen-gmc xgen-gmc~                                     \
106         && echo timestamp > $(@F)
107
108 atk-enum-types.h: s-enum-types-h
109         @true
110 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
111         ( cd $(srcdir) && glib-mkenums \
112                         --fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
113                         --fprod "/* enumerations from \"@filename@\" */\n" \
114                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
115                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
116                 $(atk_headers) ) > tmp-atk-enum-types.h \
117         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
118         && rm -f tmp-atk-enum-types.h \
119         && echo timestamp > $(@F)
120
121 atk-enum-types.c: s-enum-types-c
122         @true
123 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
124         ( cd $(srcdir) && glib-mkenums \
125                         --fhead "#include <atk.h>" \
126                         --fprod "\n/* enumerations from \"@filename@\" */" \
127                         --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[] = {"     \
128                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
129                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
130                 $(atk_headers) ) > tmp-atk-enum-types.c \
131         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
132         && rm -f tmp-atk-enum-types.c \
133         && echo timestamp > $(@F)
134
135 # ---------- Win32 stuff ----------
136
137 if OS_WIN32
138 libatk_1_0_la_LDFLAGS += -export-symbols $(srcdir)/atk.def -no-undefined -Wl,atk-win32-res.o
139 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o
140
141 install-def-file:
142         $(INSTALL) $(srcdir)/atk.def $(DESTDIR)$(libdir)/atk-1.0.def
143 uninstall-def-file:
144         -rm $(DESTDIR)$(libdir)/atk-1.0.def
145 else
146 install-def-file:
147 uninstall-def-file:
148 endif
149
150 atk-win32-res.o: atk.rc
151         $(WINDRES) $< $@
152
153 if MS_LIB_AVAILABLE
154 noinst_DATA = atk-$(ATK_API_VERSION).lib
155
156 install-ms-lib:
157         $(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)
158
159 uninstall-ms-lib:
160         -rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).lib
161 else
162 install-ms-lib:
163 uninstall-ms-lib:
164 endif
165
166 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
167         lib -name:libatk-$(ATK_API_VERSION)-$(LT_CURRENT_MINUS_AGE).dll -def:atk.def -out:$@
168
169
170 EXTRA_DIST = atk.def atk.rc.in atkmarshal.list atkintl.h
171
172 DISTCLEANFILES = \
173   stamp-atkmarshal.h stamp-atkmarshal.c \
174   s-enum-types-h s-enum-types-c
175
176 distclean-local:
177         if test $(srcdir) = .; then :; else \
178           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
179         fi
180
181 install-data-local: install-ms-lib install-def-file
182
183 uninstall-local: uninstall-ms-lib uninstall-def-file