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