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