summaryrefslogtreecommitdiff
path: root/atk/Makefile.am
blob: ed84cf28e91b8ab1406994aa6142db0feccdf928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# We set GPATH here; this gives us semantics for GNU make
# which are more like other make's VPATH.
GPATH = $(srcdir)

EXTRA_DIST = atk.def atk.rc.in

if PLATFORM_WIN32
export_symbols = -export-symbols atk.def
no_undefined = -no-undefined
endif

if OS_WIN32
libatk_1_0_la_LIBADD += atk-win32res.lo

install-libtool-import-lib:
	$(INSTALL) .libs/libatk-$(ATK_API_VERSION).dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libatk-$(ATK_API_VERSION).dll.a
endif

atk-win32res.lo: atk.rc
	$(top_srcdir)/../glib/build/win32/lt-compile-resource $< $@

lib_LTLIBRARIES = libatk-1.0.la

if MS_LIB_AVAILABLE
noinst_DATA = atk-$(ATK_API_VERSION).lib

install-ms-lib:
	$(INSTALL) atk-$(ATK_API_VERSION).lib $(DESTDIR)$(libdir)

uninstall-ms-lib:
	-rm $(DESTDIR)$(libdir)/atk-$(ATK_API_VERSION).lib
endif

atk_built_headers = atk-enum-types.h
atk_built_cfiles = atk-enum-types.c

$(OBJECTS): $(atk_built_headers)

libatk_1_0_la_SOURCES = 	\
	atkaction.c		\
	atkcomponent.c		\
	atkdocument.c		\
	atkeditabletext.c	\
	atkgobjectaccessible.c	\
	atkhyperlink.c		\
	atkhypertext.c		\
	atkimage.c		\
	atknoopobject.c		\
	atknoopobjectfactory.c	\
	atkobject.c		\
	atkobjectfactory.c	\
	atkregistry.c		\
	atkrelation.c		\
	atkrelationset.c	\
	atkselection.c		\
	atkstate.c		\
	atkstateset.c		\
	atkstreamablecontent.c	\
	atktable.c		\
	atktext.c		\
	atkutil.c		\
	atkvalue.c		\
	$(atk_built_cfiles)

EXTRA_DIST += atkmarshal.list	\
		atkintl.h

MAINTAINERCLEANFILES =	 	\
	atkmarshal.c		\
	atkmarshal.h		\
	stamp-atkmarshal.c	\
	stamp-atkmarshal.h

INCLUDES = \
	-I$(top_srcdir)		\
	-DG_DISABLE_DEPRECATED	\
	@DEP_CFLAGS@		\
	-DATKLOCALEDIR=\""$(atklocaledir)"\"

AM_LDFLAGS =  					\
	-version-info $(LT_VERSION_INFO)	\
	$(export_symbols)			\
	-no-undefined				\
	@DEP_LIBS@

libatkincludedir=$(includedir)/atk-1.0/atk

atk_headers = \
        atk.h			\
        atkaction.h		\
        atkcomponent.h		\
        atkdocument.h		\
        atkeditabletext.h	\
        atkgobjectaccessible.h	\
        atkhyperlink.h		\
        atkhypertext.h		\
        atknoopobject.h		\
        atknoopobjectfactory.h	\
        atkobject.h		\
	atkobjectfactory.h	\
        atkimage.h		\
        atkregistry.h		\
        atkrelation.h		\
        atkrelationtype.h	\
        atkrelationset.h	\
        atkselection.h		\
        atkstate.h		\
        atkstateset.h		\
        atkstreamablecontent.h	\
        atktable.h		\
        atktext.h		\
        atkutil.h		\
        atkvalue.h

libatkinclude_HEADERS =		\
	$(atk_headers)		\
	$(atk_built_headers)

$(libatk_1_0_la_OBJECTS): atkmarshal.c atkmarshal.h $(atk_built_headers)

atkmarshal.h: @REBUILD@ stamp-atkmarshal.h
	@true
stamp-atkmarshal.h: atkmarshal.list
	case @GLIB_GENMARSHAL@ in									\
	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
	   *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;							\
	esac;												\
	$$glib_genmarshal --prefix=atk_marshal $(srcdir)/atkmarshal.list --header >> xgen-gmh		\
	&& (cmp -s xgen-gmh $(srcdir)/atkmarshal.h || cp xgen-gmh $(srcdir)/atkmarshal.h)		\
	&& rm -f xgen-gmh xgen-gmh~									\
	&& echo timestamp > $(@F)

atkmarshal.c: @REBUILD@ stamp-atkmarshal.c
	@true
stamp-atkmarshal.c: atkmarshal.list
	case @GLIB_GENMARSHAL@ in									\
	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
	   *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;							\
	esac;												\
	$$glib_genmarshal --prefix=atk_marshal $(srcdir)/atkmarshal.list --body >> xgen-gmc		\
	&& (cmp -s xgen-gmc $(srcdir)/atkmarshal.c || cp xgen-gmc $(srcdir)/atkmarshal.c)		\
	&& rm -f xgen-gmc xgen-gmc~									\
	&& echo timestamp > $(@F)

atk-enum-types.h: s-enum-types-h
	@true

s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
	( cd $(srcdir) && glib-mkenums \
			--fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
			--fprod "/* enumerations from \"@filename@\" */\n" \
			--vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
			--ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \
		$(atk_headers) ) > tmp-atk-enum-types.h \
	&& (cmp -s tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h || cp tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h ) \
	&& rm -f tmp-atk-enum-types.h \
	&& echo timestamp > $(@F)

atk-enum-types.c: s-enum-types-c
	@true

s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
	( cd $(srcdir) && glib-mkenums \
			--fhead "#include <atk.h>" \
			--fprod "\n/* enumerations from \"@filename@\" */" \
			--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[] = {"     \
			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$(atk_headers) ) > tmp-atk-enum-types.c \
	&& (cmp -s tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c || cp tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c ) \
	&& rm -f tmp-atk-enum-types.c \
	&& echo timestamp > $(@F)

# This doesn't want doing when building Cygwin DLLs
if OS_WIN32
atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
	lib -name:libatk-$(ATK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:atk.def -out:$@

install-data-local: install-ms-lib install-libtool-import-lib

uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
endif