New file
[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-$(ATK_API_VERSION).dll.a $(DESTDIR)$(libdir)
12 uninstall-libtool-import-lib:
13         -rm $(DESTDIR)$(libdir)/libatk-$(ATK_API_VERSION).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-$(ATK_API_VERSION).lib
23
24 install-ms-lib:
25         $(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)
26
27 uninstall-ms-lib:
28         -rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).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                 atkintl.h
67
68 MAINTAINERCLEANFILES +=         \
69         atkmarshal.c            \
70         atkmarshal.h            \
71         stamp-atkmarshal.c      \
72         stamp-atkmarshal.h
73
74 INCLUDES = \
75         -I$(top_srcdir)         \
76         -DG_DISABLE_DEPRECATED  \
77         @DEP_CFLAGS@            \
78         -DATKLOCALEDIR=\""$(atklocaledir)"\"
79
80 LDFLAGS =                                       \
81         -version-info $(LT_VERSION_INFO)        \
82         $(export_symbols)                       \
83         $(no_undefined)                         \
84         @DEP_LIBS@
85
86 libatkincludedir=$(includedir)/atk-1.0/atk
87
88 atk_headers = \
89         atk.h                   \
90         atkaction.h             \
91         atkcomponent.h          \
92         atkdocument.h           \
93         atkeditabletext.h       \
94         atkgobjectaccessible.h  \
95         atkhyperlink.h          \
96         atkhypertext.h          \
97         atknoopobject.h         \
98         atknoopobjectfactory.h  \
99         atkobject.h             \
100         atkobjectfactory.h      \
101         atkimage.h              \
102         atkregistry.h           \
103         atkrelation.h           \
104         atkrelationtype.h       \
105         atkrelationset.h        \
106         atkselection.h          \
107         atkstate.h              \
108         atkstateset.h           \
109         atkstreamablecontent.h  \
110         atktable.h              \
111         atktext.h               \
112         atkutil.h               \
113         atkvalue.h
114
115 libatkinclude_HEADERS =         \
116         $(atk_headers)          \
117         $(atk_built_headers)
118
119 $(libatk_1_0_la_OBJECTS): atkmarshal.c atkmarshal.h $(atk_built_headers)
120
121 atkmarshal.h: @REBUILD@ stamp-atkmarshal.h
122         @true
123 stamp-atkmarshal.h: atkmarshal.list
124         case @GLIB_GENMARSHAL@ in                                                                       \
125            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
126            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
127         esac;                                                                                           \
128         $$glib_genmarshal --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh           \
129         && (cmp -s xgen-gmh $(srcdir)/atkmarshal.h || cp xgen-gmh $(srcdir)/atkmarshal.h)               \
130         && rm -f xgen-gmh xgen-gmh~                                                                     \
131         && echo timestamp > $(@F)
132
133 atkmarshal.c: @REBUILD@ stamp-atkmarshal.c
134         @true
135 stamp-atkmarshal.c: atkmarshal.list
136         case @GLIB_GENMARSHAL@ in                                                                       \
137            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
138            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
139         esac;                                                                                           \
140         $$glib_genmarshal --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc             \
141         && (cmp -s xgen-gmc $(srcdir)/atkmarshal.c || cp xgen-gmc $(srcdir)/atkmarshal.c)               \
142         && rm -f xgen-gmc xgen-gmc~                                                                     \
143         && echo timestamp > $(@F)
144
145 atk-enum-types.h: s-enum-types-h
146         @true
147
148 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
149         ( cd $(srcdir) && glib-mkenums \
150                         --fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
151                         --fprod "/* enumerations from \"@filename@\" */\n" \
152                         --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
153                         --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
154                 $(atk_headers) ) > tmp-atk-enum-types.h \
155         && (cmp -s tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h || cp tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h ) \
156         && rm -f tmp-atk-enum-types.h \
157         && echo timestamp > $(@F)
158
159 atk-enum-types.c: s-enum-types-c
160         @true
161
162 s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
163         ( cd $(srcdir) && glib-mkenums \
164                         --fhead "#include <atk.h>" \
165                         --fprod "\n/* enumerations from \"@filename@\" */" \
166                         --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[] = {"     \
167                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
168                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
169                 $(atk_headers) ) > tmp-atk-enum-types.c \
170         && (cmp -s tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c || cp tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c ) \
171         && rm -f tmp-atk-enum-types.c \
172         && echo timestamp > $(@F)
173
174
175 atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
176         lib -name:libatk-$(ATK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:atk.def -out:$@
177
178 install-data-local: install-ms-lib install-libtool-import-lib
179
180 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib