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