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