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