Provide eject() on both GMount and GVolume and utility functions to guess
[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 gio.def: gio.symbols
12         (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 && \
13           mv gio.def.tmp gio.def
14
15 gioalias.h: gio.symbols
16         $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \
17           mv gioalias.h.tmp gioalias.h
18
19 gioaliasdef.c: gio.symbols
20         $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \
21           mv gioaliasdef.c.tmp gioaliasdef.c
22
23 if OS_LINUX
24 if HAVE_GNUC_VISIBILITY
25 TESTS = abicheck.sh pltcheck.sh
26 endif
27 endif
28
29 AM_CPPFLAGS = \
30         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
31         -I$(top_builddir)                               \
32         -I$(top_srcdir)                                 \
33         -I$(top_srcdir)/glib                            \
34         -I$(top_srcdir)/gmodule                         \
35         $(GLIB_DEBUG_FLAGS)                             \
36         -DG_DISABLE_DEPRECATED                          \
37         -DGIO_COMPILATION                               \
38         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
39
40 lib_LTLIBRARIES = libgio-2.0.la
41
42 marshal_sources = \
43         gio-marshal.h   \
44         gio-marshal.c   \
45         $(NULL)
46
47 if CROSS_COMPILING
48   glib_genmarshal=$(GLIB_GENMARSHAL)
49 else
50   glib_genmarshal=../gobject/glib-genmarshal
51 endif
52
53 gio-marshal.h: gio-marshal.list
54         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header > $@.tmp && \
55           mv $@.tmp $@
56
57 gio-marshal.c: gio-marshal.h gio-marshal.list
58         (echo "#include \"gio-marshal.h\""; \
59         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body) > $@.tmp && \
60           mv $@.tmp $@
61
62 local_sources = \
63         glocaldirectorymonitor.c        \
64         glocaldirectorymonitor.h        \
65         glocalfile.c                    \
66         glocalfile.h                    \
67         glocalfileenumerator.c          \
68         glocalfileenumerator.h          \
69         glocalfileinfo.c                \
70         glocalfileinfo.h                \
71         glocalfileinputstream.c         \
72         glocalfileinputstream.h         \
73         glocalfilemonitor.c             \
74         glocalfilemonitor.h             \
75         glocalfileoutputstream.c        \
76         glocalfileoutputstream.h        \
77         glocalvfs.c                     \
78         glocalvfs.h                     \
79         $(NULL)
80
81 platform_libadd =
82 appinfo_sources =
83
84 if HAVE_INOTIFY
85 SUBDIRS += inotify
86 platform_libadd += inotify/libinotify.la
87 endif
88
89 SUBDIRS += .
90
91 if HAVE_FAM
92 SUBDIRS += fam
93 endif
94
95 if OS_UNIX
96 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
97 platform_libadd += xdgmime/libxdgmime.la
98 unix_sources = \
99         gunixmount.c            \
100         gunixmount.h            \
101         gunixmounts.c           \
102         gunixmounts.h           \
103         gunixvolume.c           \
104         gunixvolume.h           \
105         gunixvolumemonitor.c    \
106         gunixvolumemonitor.h    \
107         gunixinputstream.c      \
108         gunixoutputstream.c     \
109         $(NULL)
110
111
112 giounixincludedir=$(includedir)/gio-unix-2.0/gio
113 giounixinclude_HEADERS = \
114         gdesktopappinfo.h       \
115         gunixmounts.h           \
116         gunixinputstream.h      \
117         gunixoutputstream.h     \
118         $(NULL)
119 endif
120
121 if OS_WIN32
122 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
123 platform_libadd += -lshlwapi
124 endif
125
126 libgio_2_0_la_SOURCES =         \
127         gappinfo.c              \
128         gasynchelper.c          \
129         gasynchelper.h          \
130         gasyncresult.c          \
131         gbufferedinputstream.c  \
132         gbufferedoutputstream.c \
133         gcancellable.c          \
134         gcontenttype.c          \
135         gcontenttypeprivate.h   \
136         gdatainputstream.c      \
137         gdataoutputstream.c     \
138         gdirectorymonitor.c     \
139         gdrive.c                \
140         gdummyfile.h            \
141         gdummyfile.c            \
142         gfile.c                 \
143         gfileattribute.c        \
144         gfileattribute-priv.h   \
145         gfileenumerator.c       \
146         gfileicon.c             \
147         gfileinfo.c             \
148         gfileinputstream.c      \
149         gfilemonitor.c          \
150         gfilenamecompleter.c    \
151         gfileoutputstream.c     \
152         gfilterinputstream.c    \
153         gfilteroutputstream.c   \
154         gicon.c                 \
155         ginputstream.c          \
156         gioerror.c              \
157         giomodule.c             \
158         giomodule-priv.h        \
159         gioscheduler.c          \
160         gloadableicon.c         \
161         gmount.c                \
162         gmemoryinputstream.c    \
163         gmemoryoutputstream.c   \
164         gmountoperation.c       \
165         gnativevolumemonitor.c  \
166         gnativevolumemonitor.h  \
167         goutputstream.c         \
168         gpollfilemonitor.c      \
169         gpollfilemonitor.h      \
170         gseekable.c             \
171         gsimpleasyncresult.c    \
172         gthemedicon.c           \
173         gunionvolumemonitor.c   \
174         gunionvolumemonitor.h   \
175         gvfs.c                  \
176         gvolume.c               \
177         gvolumemonitor.c        \
178         gmountprivate.h         \
179         gioenumtypes.h          \
180         gioenumtypes.c          \
181         $(appinfo_sources)      \
182         $(unix_sources)         \
183         $(local_sources)        \
184         $(marshal_sources)      \
185         $(NULL)
186
187 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
188
189 libgio_2_0_la_LIBADD = \
190         $(top_builddir)/glib/libglib-2.0.la             \
191         $(top_builddir)/gobject/libgobject-2.0.la       \
192         $(top_builddir)/gmodule/libgmodule-2.0.la       \
193         $(platform_libadd)                              \
194         $(SELINUX_LIBS)                                 \
195         $(GLIB_LIBS)                                    \
196         $(XATTR_LIBS)                                   \
197         $(NULL)
198
199 if OS_WIN32
200 no_undefined = -no-undefined
201 endif
202
203 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
204
205 gio_headers =                   \
206         gappinfo.h              \
207         gasyncresult.h          \
208         gbufferedinputstream.h  \
209         gbufferedoutputstream.h \
210         gcancellable.h          \
211         gcontenttype.h          \
212         gdatainputstream.h      \
213         gdataoutputstream.h     \
214         gdirectorymonitor.h     \
215         gdrive.h                \
216         gfile.h                 \
217         gfileattribute.h        \
218         gfileenumerator.h       \
219         gfileicon.h             \
220         gfileinfo.h             \
221         gfileinputstream.h      \
222         gfilemonitor.h          \
223         gfilenamecompleter.h    \
224         gfileoutputstream.h     \
225         gfilterinputstream.h    \
226         gfilteroutputstream.h   \
227         gicon.h                 \
228         ginputstream.h          \
229         gio.h                   \
230         gioerror.h              \
231         giomodule.h             \
232         gioscheduler.h          \
233         gloadableicon.h         \
234         gmount.h                \
235         gmemoryinputstream.h    \
236         gmemoryoutputstream.h   \
237         gmountoperation.h       \
238         gnativevolumemonitor.h  \
239         goutputstream.h         \
240         gseekable.h             \
241         gsimpleasyncresult.h    \
242         gthemedicon.h           \
243         gvfs.h                  \
244         gvolume.h               \
245         gvolumemonitor.h        \
246         $(NULL)
247
248 gioincludedir=$(includedir)/glib-2.0/gio/
249 gioinclude_HEADERS =            \
250         $(gio_headers)          \
251         gioenumtypes.h
252
253 # these sources (also mentioned above) are generated.
254 BUILT_SOURCES =                 \
255         gio-marshal.h           \
256         gio-marshal.c           \
257         gioalias.h              \
258         gioaliasdef.c           \
259         gioenumtypes.h          \
260         gioenumtypes.c          \
261         $(NULL)
262
263 EXTRA_DIST +=                   \
264         gio-marshal.list        \
265         gio.symbols             \
266         gioenumtypes.h.template \
267         gioenumtypes.c.template \
268         $(NULL)
269
270 CLEANFILES =                    \
271         $(marshal_sources)      \
272         $(NULL)
273
274 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
275         ( top_builddir=`cd $(top_builddir) && pwd`; \
276           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
277             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
278
279 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
280         ( top_builddir=`cd $(top_builddir) && pwd`; \
281           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
282             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c