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