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