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