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