Bug #601552. New classes: AtkPlug and AtkSocket.
[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         atkplug.c               \
41         atkregistry.c           \
42         atkrelation.c           \
43         atkrelationset.c        \
44         atkselection.c          \
45         atksocket.c             \
46         atkstate.c              \
47         atkstateset.c           \
48         atkstreamablecontent.c  \
49         atktable.c              \
50         atktext.c               \
51         atkutil.c               \
52         atkmisc.c               \
53         atkvalue.c              \
54         atk-enum-types.c
55
56 libatkincludedir=$(includedir)/atk-1.0/atk
57
58 atk_headers = \
59         atk.h                   \
60         atkaction.h             \
61         atkcomponent.h          \
62         atkdocument.h           \
63         atkeditabletext.h       \
64         atkgobjectaccessible.h  \
65         atkhyperlink.h          \
66         atkhyperlinkimpl.h      \
67         atkhypertext.h          \
68         atknoopobject.h         \
69         atknoopobjectfactory.h  \
70         atkobject.h             \
71         atkobjectfactory.h      \
72         atkplug.h               \
73         atkimage.h              \
74         atkregistry.h           \
75         atkrelation.h           \
76         atkrelationtype.h       \
77         atkrelationset.h        \
78         atkselection.h          \
79         atksocket.h             \
80         atkstate.h              \
81         atkstateset.h           \
82         atkstreamablecontent.h  \
83         atktable.h              \
84         atktext.h               \
85         atkutil.h               \
86         atkmisc.h               \
87         atkvalue.h
88
89 libatkinclude_HEADERS =         \
90         $(atk_headers)          \
91         atk-enum-types.h
92
93
94 # ---------- Handle built sources ----------
95
96 BUILT_SOURCES = atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c
97
98 atkmarshal.h: stamp-atkmarshal.h
99         @true
100 stamp-atkmarshal.h: @REBUILD@ atkmarshal.list
101         $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh \
102         && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
103         && rm -f xgen-gmh xgen-gmh~                                     \
104         && echo timestamp > $(@F)
105
106 atkmarshal.c: stamp-atkmarshal.c
107         @true
108 stamp-atkmarshal.c: @REBUILD@ atkmarshal.list
109         $(GLIB_GENMARSHAL) --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc \
110         && (cmp -s xgen-gmc atkmarshal.c || cp xgen-gmc atkmarshal.c) \
111         && rm -f xgen-gmc xgen-gmc~                                     \
112         && echo timestamp > $(@F)
113
114 atk-enum-types.h: s-enum-types-h
115         @true
116 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
117         ( cd $(srcdir) && $(GLIB_MKENUMS) \
118                         --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" \
119                         --fprod "/* enumerations from \"@filename@\" */\n" \
120                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
121                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
122                 $(atk_headers) ) > tmp-atk-enum-types.h \
123         && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \
124         && rm -f tmp-atk-enum-types.h \
125         && echo timestamp > $(@F)
126
127 atk-enum-types.c: s-enum-types-c
128         @true
129 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
130         ( cd $(srcdir) && $(GLIB_MKENUMS) \
131                         --fhead "#include <atk.h>" \
132                         --fprod "\n/* enumerations from \"@filename@\" */" \
133                         --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[] = {"     \
134                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
135                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
136                 $(atk_headers) ) > tmp-atk-enum-types.c \
137         && (cmp -s tmp-atk-enum-types.c atk-enum-types.c || cp tmp-atk-enum-types.c atk-enum-types.c ) \
138         && rm -f tmp-atk-enum-types.c \
139         && echo timestamp > $(@F)
140
141 # ---------- Win32 stuff ----------
142
143 if OS_WIN32
144 libatk_1_0_la_LDFLAGS += -export-symbols $(srcdir)/atk.def -no-undefined -Wl,atk-win32-res.o
145 libatk_1_0_la_DEPENDENCIES = atk-win32-res.o 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.def: atk.symbols
173         (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
174
175 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
176         lib -machine:$(LIB_EXE_MACHINE_FLAG) -name:libatk-$(ATK_API_VERSION)-$(LT_CURRENT_MINUS_AGE).dll -def:atk.def -out:$@
177
178
179 EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atkintl.h
180
181 DISTCLEANFILES = \
182   stamp-atkmarshal.h stamp-atkmarshal.c \
183   s-enum-types-h s-enum-types-c
184
185 distclean-local:
186         if test $(srcdir) = .; then :; else \
187           rm -f atkmarshal.h atkmarshal.c atk-enum-types.h atk-enum-types.c; \
188         fi
189
190 install-data-local: install-ms-lib install-def-file
191
192 uninstall-local: uninstall-ms-lib uninstall-def-file