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