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