Clarify docs for g_memory_output_stream_get_size. Add
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 SUBDIRS=
6
7 if OS_UNIX
8 SUBDIRS += xdgmime
9 endif
10
11 if MS_LIB_AVAILABLE
12 noinst_DATA = gio-2.0.lib
13
14 install-ms-lib:
15         $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
16
17 uninstall-ms-lib:
18         -rm $(DESTDIR)$(libdir)/gio-2.0.lib
19 else
20 install-ms-lib:
21 uninstall-ms-lib:
22 endif
23
24 gio.def: gio.symbols
25         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gio.def.tmp && \
26           mv gio.def.tmp gio.def
27
28 gioalias.h: gio.symbols
29         $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \
30           mv gioalias.h.tmp gioalias.h
31
32 gioaliasdef.c: gio.symbols
33         $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \
34           mv gioaliasdef.c.tmp gioaliasdef.c
35
36 if OS_LINUX
37 if HAVE_GNUC_VISIBILITY
38 TESTS = abicheck.sh pltcheck.sh
39 endif
40 endif
41
42 AM_CPPFLAGS = \
43         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
44         -I$(top_builddir)                               \
45         -I$(top_srcdir)                                 \
46         -I$(top_srcdir)/glib                            \
47         -I$(top_srcdir)/gmodule                         \
48         $(GLIB_DEBUG_FLAGS)                             \
49         -DG_DISABLE_DEPRECATED                          \
50         -DGIO_COMPILATION                               \
51         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
52
53 lib_LTLIBRARIES = libgio-2.0.la
54
55 marshal_sources = \
56         gio-marshal.h   \
57         gio-marshal.c   \
58         $(NULL)
59
60 if CROSS_COMPILING
61   glib_genmarshal=$(GLIB_GENMARSHAL)
62 else
63   glib_genmarshal=../gobject/glib-genmarshal
64 endif
65
66 gio-marshal.h: gio-marshal.list
67         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
68           mv $@.tmp $@
69
70 gio-marshal.c: gio-marshal.h gio-marshal.list
71         (echo "#include \"gio-marshal.h\""; \
72         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
73           mv $@.tmp $@
74
75 local_sources = \
76         glocaldirectorymonitor.c        \
77         glocaldirectorymonitor.h        \
78         glocalfile.c                    \
79         glocalfile.h                    \
80         glocalfileenumerator.c          \
81         glocalfileenumerator.h          \
82         glocalfileinfo.c                \
83         glocalfileinfo.h                \
84         glocalfileinputstream.c         \
85         glocalfileinputstream.h         \
86         glocalfilemonitor.c             \
87         glocalfilemonitor.h             \
88         glocalfileoutputstream.c        \
89         glocalfileoutputstream.h        \
90         glocalvfs.c                     \
91         glocalvfs.h                     \
92         $(NULL)
93
94 platform_libadd =
95 appinfo_sources =
96
97 if HAVE_INOTIFY
98 SUBDIRS += inotify
99 platform_libadd += inotify/libinotify.la
100 endif
101
102 if HAVE_FEN
103 AM_CPPFLAGS += -DHAVE_FEN
104 SUBDIRS += fen
105 platform_libadd += fen/libfen.la
106 endif
107
108 if OS_WIN32
109 SUBDIRS += win32
110 platform_libadd += win32/libgiowin32.la
111 endif
112
113
114 SUBDIRS += .
115
116 if HAVE_FAM
117 SUBDIRS += fam
118 endif
119
120 if OS_UNIX
121 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
122 platform_libadd += xdgmime/libxdgmime.la
123 unix_sources = \
124         gunixmount.c            \
125         gunixmount.h            \
126         gunixmounts.c           \
127         gunixmounts.h           \
128         gunixvolume.c           \
129         gunixvolume.h           \
130         gunixvolumemonitor.c    \
131         gunixvolumemonitor.h    \
132         gunixinputstream.c      \
133         gunixoutputstream.c     \
134         $(NULL)
135
136
137 giounixincludedir=$(includedir)/gio-unix-2.0/gio
138 giounixinclude_HEADERS = \
139         gdesktopappinfo.h       \
140         gunixmounts.h           \
141         gunixinputstream.h      \
142         gunixoutputstream.h     \
143         $(NULL)
144 endif
145
146 if OS_WIN32
147 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
148 platform_libadd += -lshlwapi
149 endif
150
151 SUBDIRS += tests
152
153 libgio_2_0_la_SOURCES =         \
154         gappinfo.c              \
155         gasynchelper.c          \
156         gasynchelper.h          \
157         gasyncresult.c          \
158         gbufferedinputstream.c  \
159         gbufferedoutputstream.c \
160         gcancellable.c          \
161         gcontenttype.c          \
162         gcontenttypeprivate.h   \
163         gdatainputstream.c      \
164         gdataoutputstream.c     \
165         gdrive.c                \
166         gdummyfile.h            \
167         gdummyfile.c            \
168         gfile.c                 \
169         gfileattribute.c        \
170         gfileattribute-priv.h   \
171         gfileenumerator.c       \
172         gfileicon.c             \
173         gfileinfo.c             \
174         gfileinputstream.c      \
175         gfilemonitor.c          \
176         gfilenamecompleter.c    \
177         gfileoutputstream.c     \
178         gfilterinputstream.c    \
179         gfilteroutputstream.c   \
180         gicon.c                 \
181         ginputstream.c          \
182         gioerror.c              \
183         giomodule.c             \
184         giomodule-priv.h        \
185         gioscheduler.c          \
186         gloadableicon.c         \
187         gmount.c                \
188         gmemoryinputstream.c    \
189         gmemoryoutputstream.c   \
190         gmountoperation.c       \
191         gnativevolumemonitor.c  \
192         gnativevolumemonitor.h  \
193         goutputstream.c         \
194         gpollfilemonitor.c      \
195         gpollfilemonitor.h      \
196         gseekable.c             \
197         gsimpleasyncresult.c    \
198         gthemedicon.c           \
199         gunionvolumemonitor.c   \
200         gunionvolumemonitor.h   \
201         gvfs.c                  \
202         gvolume.c               \
203         gvolumemonitor.c        \
204         gmountprivate.h         \
205         gioenumtypes.h          \
206         gioenumtypes.c          \
207         gioalias.h              \
208         gioaliasdef.c           \
209         $(appinfo_sources)      \
210         $(unix_sources)         \
211         $(local_sources)        \
212         $(marshal_sources)      \
213         $(NULL)
214
215 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
216
217 libgio_2_0_la_LIBADD = \
218         $(top_builddir)/glib/libglib-2.0.la             \
219         $(top_builddir)/gobject/libgobject-2.0.la       \
220         $(top_builddir)/gmodule/libgmodule-2.0.la       \
221         $(platform_libadd)                              \
222         $(SELINUX_LIBS)                                 \
223         $(GLIB_LIBS)                                    \
224         $(XATTR_LIBS)                                   \
225         $(NULL)
226
227 if PLATFORM_WIN32
228 no_undefined = -no-undefined
229 endif
230
231 if OS_WIN32
232 export_symbols = -export-symbols gio.def
233 gio_def = gio.def
234
235 install-def-file:
236         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
237
238 uninstall-def-file:
239         -rm $(DESTDIR)$(libdir)/gio-2.0.def
240 else
241 install-def-file:
242 uninstall-def-file:
243
244 export_symbols = -export-symbols-regex '^g_.*'
245 endif
246
247 install-data-local: install-ms-lib install-def-file
248
249 uninstall-local: uninstall-ms-lib uninstall-def-file
250
251 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) $(export_symbols)
252 libgio_2_0_la_DEPENDENCIES = $(gio_def)
253
254 gio_headers =                   \
255         gappinfo.h              \
256         gasyncresult.h          \
257         gbufferedinputstream.h  \
258         gbufferedoutputstream.h \
259         gcancellable.h          \
260         gcontenttype.h          \
261         gdatainputstream.h      \
262         gdataoutputstream.h     \
263         gdrive.h                \
264         gfile.h                 \
265         gfileattribute.h        \
266         gfileenumerator.h       \
267         gfileicon.h             \
268         gfileinfo.h             \
269         gfileinputstream.h      \
270         gfilemonitor.h          \
271         gfilenamecompleter.h    \
272         gfileoutputstream.h     \
273         gfilterinputstream.h    \
274         gfilteroutputstream.h   \
275         gicon.h                 \
276         ginputstream.h          \
277         gio.h                   \
278         gioenumtypes.h          \
279         gioerror.h              \
280         giomodule.h             \
281         gioscheduler.h          \
282         gloadableicon.h         \
283         gmount.h                \
284         gmemoryinputstream.h    \
285         gmemoryoutputstream.h   \
286         gmountoperation.h       \
287         gnativevolumemonitor.h  \
288         goutputstream.h         \
289         gseekable.h             \
290         gsimpleasyncresult.h    \
291         gthemedicon.h           \
292         gvfs.h                  \
293         gvolume.h               \
294         gvolumemonitor.h        \
295         $(NULL)
296
297 gioincludedir=$(includedir)/glib-2.0/gio/
298 gioinclude_HEADERS =            \
299         $(gio_headers)          \
300         gioenumtypes.h
301
302 # these sources (also mentioned above) are generated.
303 BUILT_SOURCES =                 \
304         gio-marshal.h           \
305         gio-marshal.c           \
306         gioalias.h              \
307         gioaliasdef.c           \
308         gioenumtypes.h          \
309         gioenumtypes.c          \
310         $(NULL)
311
312 EXTRA_DIST +=                   \
313         gio-marshal.list        \
314         gio.symbols             \
315         gioenumtypes.h.template \
316         gioenumtypes.c.template \
317         makegioalias.pl         \
318         abicheck.sh             \
319         pltcheck.sh             \
320         $(NULL)
321
322 CLEANFILES =                    \
323         $(marshal_sources)      \
324         $(NULL)
325
326 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
327         ( top_builddir=`cd $(top_builddir) && pwd`; \
328           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
329             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
330
331 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
332         ( top_builddir=`cd $(top_builddir) && pwd`; \
333           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
334             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
335
336 gio-2.0.lib: libgio-2.0.la gio.def
337         lib -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@