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