Adding GProxyAddressEnumerator 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         $(AM_V_GEN) (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 if OS_LINUX
31 if HAVE_GNUC_VISIBILITY
32 TESTS = abicheck.sh
33 endif
34 endif
35
36 if HAVE_THREADS
37 THREAD_FLAGS=-DG_THREADS_MANDATORY
38 endif
39
40 AM_CPPFLAGS = \
41         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
42         $(gmodule_INCLUDES)                             \
43         $(GLIB_DEBUG_FLAGS)                             \
44         $(THREAD_FLAGS)                                 \
45         -DG_DISABLE_DEPRECATED                          \
46         -DGIO_COMPILATION                               \
47         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
48
49 lib_LTLIBRARIES = libgio-2.0.la
50
51 marshal_sources = \
52         gio-marshal.h   \
53         gio-marshal.c   \
54         $(NULL)
55
56 if CROSS_COMPILING
57   glib_genmarshal=$(GLIB_GENMARSHAL)
58 else
59   glib_genmarshal=../gobject/glib-genmarshal
60 endif
61
62 gio-marshal.h: gio-marshal.list
63         $(AM_V_GEN) $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
64           mv $@.tmp $@
65
66 gio-marshal.c: gio-marshal.h gio-marshal.list
67         $(AM_V_GEN) (echo "#include \"gio-marshal.h\""; \
68         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
69           mv $@.tmp $@
70
71 gdbus_headers =                         \
72         gdbusauthobserver.h             \
73         gcredentials.h                  \
74         gdbusutils.h                    \
75         gdbuserror.h                    \
76         gdbusaddress.h                  \
77         gdbusconnection.h               \
78         gdbusmessage.h                  \
79         gdbusnameowning.h               \
80         gdbusnamewatching.h             \
81         gdbusproxy.h                    \
82         gdbusintrospection.h            \
83         gdbusmethodinvocation.h         \
84         gdbusserver.h                   \
85         $(NULL)
86
87 gdbus_sources =                                                         \
88         gdbusutils.h                    gdbusutils.c                    \
89         gdbusaddress.h                  gdbusaddress.c                  \
90         gdbusauthobserver.h             gdbusauthobserver.c             \
91         gdbusauth.h                     gdbusauth.c                     \
92         gdbusauthmechanism.h            gdbusauthmechanism.c            \
93         gdbusauthmechanismanon.h        gdbusauthmechanismanon.c        \
94         gdbusauthmechanismexternal.h    gdbusauthmechanismexternal.c    \
95         gdbusauthmechanismsha1.h        gdbusauthmechanismsha1.c        \
96         gdbuserror.h                    gdbuserror.c                    \
97         gdbusconnection.h               gdbusconnection.c               \
98         gdbusmessage.h                  gdbusmessage.c                  \
99         gdbusnameowning.h               gdbusnameowning.c               \
100         gdbusnamewatching.h             gdbusnamewatching.c             \
101         gdbusproxy.h                    gdbusproxy.c                    \
102         gdbusprivate.h                  gdbusprivate.c                  \
103         gdbusintrospection.h            gdbusintrospection.c            \
104         gdbusmethodinvocation.h         gdbusmethodinvocation.c         \
105         gdbusserver.h                   gdbusserver.c                   \
106         $(NULL)
107
108 settings_headers = \
109         gsettingsbackend.h              \
110         gsettings.h
111
112 settings_sources = \
113         gvdb/gvdb-format.h              \
114         gvdb/gvdb-reader.h              \
115         gvdb/gvdb-reader.c              \
116         gdelayedsettingsbackend.h       \
117         gdelayedsettingsbackend.c       \
118         gkeyfilesettingsbackend.c       \
119         gmemorysettingsbackend.h        \
120         gmemorysettingsbackend.c        \
121         gnullsettingsbackend.h          \
122         gnullsettingsbackend.c          \
123         gsettingsbackendinternal.h      \
124         gsettingsbackend.c              \
125         gsettingsschema.h               \
126         gsettingsschema.c               \
127         gsettings-mapping.h             \
128         gsettings-mapping.c             \
129         gsettings.c
130
131 application_headers = \
132         gactiongroup.h                  \
133         gsimpleactiongroup.h            \
134         gaction.h                       \
135         gapplication.h
136
137 application_sources = \
138         gactiongroup.c                  \
139         gsimpleactiongroup.c            \
140         gaction.c                       \
141         gapplication.c
142
143
144 local_sources = \
145         glocaldirectorymonitor.c        \
146         glocaldirectorymonitor.h        \
147         glocalfile.c                    \
148         glocalfile.h                    \
149         glocalfileenumerator.c          \
150         glocalfileenumerator.h          \
151         glocalfileinfo.c                \
152         glocalfileinfo.h                \
153         glocalfileinputstream.c         \
154         glocalfileinputstream.h         \
155         glocalfilemonitor.c             \
156         glocalfilemonitor.h             \
157         glocalfileoutputstream.c        \
158         glocalfileoutputstream.h        \
159         glocalfileiostream.c            \
160         glocalfileiostream.h            \
161         glocalvfs.c                     \
162         glocalvfs.h                     \
163         $(NULL)
164
165 platform_libadd =
166 platform_deps =
167 appinfo_sources =
168
169 if HAVE_INOTIFY
170 SUBDIRS += inotify
171 platform_libadd += inotify/libinotify.la
172 platform_deps += inotify/libinotify.la
173 endif
174
175 if HAVE_FEN
176 AM_CPPFLAGS += -DHAVE_FEN
177 SUBDIRS += fen
178 platform_libadd += fen/libfen.la
179 platform_deps += fen/libfen.la
180 endif
181
182 if OS_WIN32
183 SUBDIRS += win32
184 platform_libadd += win32/libgiowin32.la
185 platform_deps += win32/libgiowin32.la
186 endif
187
188
189 SUBDIRS += .
190
191 if HAVE_FAM
192 SUBDIRS += fam
193 endif
194
195 if OS_UNIX
196 appinfo_sources += gdesktopappinfo.c
197 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
198 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
199 unix_sources = \
200         gfiledescriptorbased.c  \
201         gunixconnection.c       \
202         gunixcredentialsmessage.c       \
203         gunixfdlist.c           \
204         gunixfdmessage.c        \
205         gunixmount.c            \
206         gunixmount.h            \
207         gunixmounts.c           \
208         gunixresolver.c         \
209         gunixresolver.h         \
210         gunixsocketaddress.c    \
211         gunixvolume.c           \
212         gunixvolume.h           \
213         gunixvolumemonitor.c    \
214         gunixvolumemonitor.h    \
215         gunixinputstream.c      \
216         gunixoutputstream.c     \
217         $(NULL)
218
219
220 giounixincludedir=$(includedir)/gio-unix-2.0/gio
221 giounixinclude_HEADERS = \
222         gdesktopappinfo.h       \
223         gfiledescriptorbased.h  \
224         gunixconnection.h       \
225         gunixcredentialsmessage.h       \
226         gunixmounts.h           \
227         gunixfdlist.h           \
228         gunixfdmessage.h        \
229         gunixinputstream.h      \
230         gunixoutputstream.h     \
231         gunixsocketaddress.h    \
232         $(NULL)
233 endif
234
235 win32_actual_sources = \
236         gwin32mount.c \
237         gwin32mount.h \
238         gwin32resolver.c \
239         gwin32resolver.h \
240         gwin32volumemonitor.c \
241         gwin32volumemonitor.h \
242         gwin32inputstream.c \
243         gwin32outputstream.c \
244         gwin32outputstream.h \
245         $(NULL)
246
247 win32_more_sources_for_vcproj = \
248         gwin32appinfo.c \
249         win32/gwin32directorymonitor.c \
250         win32/gwinhttpfile.c \
251         win32/gwinhttpfileinputstream.c \
252         win32/gwinhttpfileoutputstream.c \
253         win32/gwinhttpvfs.c
254
255 if OS_WIN32
256 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
257 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
258 win32_sources = $(win32_actual_sources)
259
260 giowin32includedir=$(includedir)/gio-win32-2.0/gio
261 giowin32include_HEADERS = \
262         gwin32inputstream.h \
263         gwin32outputstream.h \
264         $(NULL)
265
266 endif
267
268 SUBDIRS += tests
269
270 libgio_2_0_la_SOURCES =         \
271         gappinfo.c              \
272         gasynchelper.c          \
273         gasynchelper.h          \
274         gasyncinitable.c        \
275         gasyncresult.c          \
276         gbufferedinputstream.c  \
277         gbufferedoutputstream.c \
278         gcancellable.c          \
279         gcontenttype.c          \
280         gcontenttypeprivate.h   \
281         gcharsetconverter.c     \
282         gconverter.c            \
283         gconverterinputstream.c \
284         gconverteroutputstream.c        \
285         gcredentials.c          \
286         gdatainputstream.c      \
287         gdataoutputstream.c     \
288         gdrive.c                \
289         gdummyfile.h            \
290         gdummyfile.c            \
291         gdummyproxyresolver.c   \
292         gdummyproxyresolver.h   \
293         gemblem.h               \
294         gemblem.c               \
295         gemblemedicon.h         \
296         gemblemedicon.c         \
297         gfile.c                 \
298         gfileattribute.c        \
299         gfileattribute-priv.h   \
300         gfileenumerator.c       \
301         gfileicon.c             \
302         gfileinfo.c             \
303         gfileinfo-priv.h        \
304         gfileinputstream.c      \
305         gfilemonitor.c          \
306         gfilenamecompleter.c    \
307         gfileoutputstream.c     \
308         gfileiostream.c         \
309         gfilterinputstream.c    \
310         gfilteroutputstream.c   \
311         gicon.c                 \
312         ginetaddress.c          \
313         ginetsocketaddress.c    \
314         ginitable.c             \
315         ginputstream.c          \
316         gioenums.h              \
317         gioerror.c              \
318         giomodule.c             \
319         giomodule-priv.h        \
320         gioscheduler.c          \
321         giostream.c             \
322         gloadableicon.c         \
323         gmount.c                \
324         gmemoryinputstream.c    \
325         gmemoryoutputstream.c   \
326         gmountoperation.c       \
327         gnativevolumemonitor.c  \
328         gnativevolumemonitor.h  \
329         gnetworkaddress.c       \
330         gnetworkingprivate.h    \
331         gnetworkservice.c       \
332         goutputstream.c         \
333         gpermission.c           \
334         gpollfilemonitor.c      \
335         gpollfilemonitor.h      \
336         gproxyresolver.c        \
337         gresolver.c             \
338         gseekable.c             \
339         gsimpleasyncresult.c    \
340         gsimplepermission.c     \
341         gsocket.c               \
342         gsocketaddress.c        \
343         gsocketaddressenumerator.c \
344         gsocketclient.c         \
345         gsocketconnectable.c    \
346         gsocketconnection.c     \
347         gsocketcontrolmessage.c \
348         gsocketinputstream.c    \
349         gsocketinputstream.h    \
350         gsocketlistener.c       \
351         gsocketoutputstream.c   \
352         gsocketoutputstream.h   \
353         gproxy.c                \
354         gproxyaddress.c         \
355         gproxyaddressenumerator.c \
356         gsocketservice.c        \
357         gsrvtarget.c            \
358         gtcpconnection.c        \
359         gthreadedsocketservice.c\
360         gthemedicon.c           \
361         gthreadedresolver.c     \
362         gthreadedresolver.h     \
363         gunionvolumemonitor.c   \
364         gunionvolumemonitor.h   \
365         gvfs.c                  \
366         gvolume.c               \
367         gvolumemonitor.c        \
368         gzlibcompressor.c       \
369         gzlibdecompressor.c     \
370         gmountprivate.h         \
371         gioenumtypes.h          \
372         gioenumtypes.c          \
373         $(appinfo_sources)      \
374         $(unix_sources)         \
375         $(win32_sources)        \
376         $(application_sources)  \
377         $(settings_sources)     \
378         $(gdbus_sources)        \
379         $(local_sources)        \
380         $(marshal_sources)      \
381         $(NULL)
382
383 EXTRA_DIST += gnullapplication.c gdbusapplication.c strinfo.c
384
385 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
386
387 libgio_2_0_la_LIBADD = \
388         $(top_builddir)/glib/libglib-2.0.la             \
389         $(top_builddir)/gobject/libgobject-2.0.la       \
390         $(top_builddir)/gmodule/libgmodule-2.0.la       \
391         $(platform_libadd)                              \
392         $(ZLIB_LIBS)                                    \
393         $(SELINUX_LIBS)                                 \
394         $(GLIB_LIBS)                                    \
395         $(XATTR_LIBS)                                   \
396         $(NULL)
397
398 if PLATFORM_WIN32
399 no_undefined = -no-undefined
400 endif
401
402 if OS_WIN32_AND_DLL_COMPILATION
403 export_symbols = -export-symbols gio.def
404 gio_def = gio.def
405
406 gio_win32_res = gio-win32-res.o
407 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
408
409 install-def-file:
410         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
411
412 uninstall-def-file:
413         -rm $(DESTDIR)$(libdir)/gio-2.0.def
414 else
415 install-def-file:
416 uninstall-def-file:
417
418 export_symbols = -export-symbols-regex '^g_.*'
419 endif
420
421 install-data-local: install-ms-lib install-def-file
422         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
423
424 uninstall-local: uninstall-ms-lib uninstall-def-file
425
426 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
427         $(gio_win32_res_ldflag) \
428         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
429         -export-dynamic $(no_undefined) $(export_symbols)
430
431 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
432
433 gio-win32-res.o: gio.rc
434         $(WINDRES) gio.rc $@
435
436 gio_headers =                   \
437         gappinfo.h              \
438         gasyncinitable.h        \
439         gasyncresult.h          \
440         gbufferedinputstream.h  \
441         gbufferedoutputstream.h \
442         gcancellable.h          \
443         gcontenttype.h          \
444         gcharsetconverter.h     \
445         gconverter.h            \
446         gconverterinputstream.h \
447         gconverteroutputstream.h        \
448         gdatainputstream.h      \
449         gdataoutputstream.h     \
450         gdrive.h                \
451         gemblem.h               \
452         gemblemedicon.h         \
453         gfile.h                 \
454         gfileattribute.h        \
455         gfileenumerator.h       \
456         gfileicon.h             \
457         gfileinfo.h             \
458         gfileinputstream.h      \
459         gfilemonitor.h          \
460         gfilenamecompleter.h    \
461         gfileoutputstream.h     \
462         gfileiostream.h         \
463         gfilterinputstream.h    \
464         gfilteroutputstream.h   \
465         gicon.h                 \
466         ginetaddress.h          \
467         ginetsocketaddress.h    \
468         ginputstream.h          \
469         ginitable.h             \
470         gio.h                   \
471         giotypes.h              \
472         gioenums.h              \
473         gioerror.h              \
474         giomodule.h             \
475         gioscheduler.h          \
476         giostream.h             \
477         gloadableicon.h         \
478         gmount.h                \
479         gmemoryinputstream.h    \
480         gmemoryoutputstream.h   \
481         gmountoperation.h       \
482         gnativevolumemonitor.h  \
483         gnetworkaddress.h       \
484         gnetworkservice.h       \
485         goutputstream.h         \
486         gpermission.h           \
487         gproxyaddress.h         \
488         gproxy.h                \
489         gproxyaddressenumerator.h \
490         gproxyresolver.h        \
491         gresolver.h             \
492         gseekable.h             \
493         gsimpleasyncresult.h    \
494         gsimplepermission.h     \
495         gsocket.h               \
496         gsocketaddress.h        \
497         gsocketaddressenumerator.h \
498         gsocketclient.h         \
499         gsocketconnectable.h    \
500         gsocketconnection.h     \
501         gsocketcontrolmessage.h \
502         gsocketlistener.h       \
503         gsocketservice.h        \
504         gsrvtarget.h            \
505         gtcpconnection.h        \
506         gthreadedsocketservice.h\
507         gthemedicon.h           \
508         gvfs.h                  \
509         gvolume.h               \
510         gvolumemonitor.h        \
511         gzlibcompressor.h       \
512         gzlibdecompressor.h     \
513         $(application_headers)  \
514         $(settings_headers)     \
515         $(gdbus_headers)        \
516         $(NULL)
517
518 gioincludedir=$(includedir)/glib-2.0/gio/
519 gioinclude_HEADERS =            \
520         $(gio_headers)          \
521         gioenumtypes.h
522
523 # these sources (also mentioned above) are generated.
524 BUILT_SOURCES =                 \
525         gio-marshal.h           \
526         gio-marshal.c           \
527         gioenumtypes.h          \
528         gioenumtypes.c          \
529         $(NULL)
530
531 EXTRA_DIST +=                   \
532         gio-marshal.list        \
533         gio.symbols             \
534         gioenumtypes.h.template \
535         gioenumtypes.c.template \
536         makefile.msc            \
537         abicheck.sh             \
538         gio.rc.in               \
539         gschema.dtd             \
540         $(NULL)
541
542 BUILT_EXTRA_DIST =              \
543         gio.rc
544
545 CLEANFILES =                    \
546         $(marshal_sources)      \
547         $(NULL)
548
549 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
550         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
551           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
552             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
553
554 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
555         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
556           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
557             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
558
559 gio-2.0.lib: libgio-2.0.la gio.def
560         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
561
562 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
563
564 gio_querymodules_SOURCES = gio-querymodules.c
565 gio_querymodules_LDADD   = \
566         $(top_builddir)/glib/libglib-2.0.la             \
567         $(top_builddir)/gobject/libgobject-2.0.la       \
568         $(top_builddir)/gmodule/libgmodule-2.0.la       \
569         libgio-2.0.la                                   \
570         $(NULL)
571
572 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
573 glib_compile_schemas_SOURCES = \
574         gvdb/gvdb-format.h              \
575         gvdb/gvdb-builder.h             \
576         gvdb/gvdb-builder.c             \
577         gschema-compile.c
578
579 gsettings_LDADD = \
580         $(top_builddir)/glib/libglib-2.0.la             \
581         $(top_builddir)/gobject/libgobject-2.0.la       \
582         libgio-2.0.la
583 gsettings_SOURCES = gsettings-tool.c
584
585 schemadir = $(datadir)/glib-2.0/schemas
586 dist_schema_DATA = gschema.dtd
587
588 # ------------------------------------------------------------------------
589 # gdbus(1) tool
590
591 bin_PROGRAMS += gdbus
592 gdbus_SOURCES = gdbus-tool.c
593 gdbus_LDADD = libgio-2.0.la \
594         $(top_builddir)/glib/libglib-2.0.la             \
595         $(top_builddir)/gobject/libgobject-2.0.la
596
597 completiondir = $(sysconfdir)/bash_completion.d
598 completion_SCRIPTS = \
599         gdbus-bash-completion.sh                \
600         gsettings-bash-completion.sh
601 EXTRA_DIST += $(completion_SCRIPTS)
602
603 # ------------------------------------------------------------------------
604
605 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
606         files='$(BUILT_EXTRA_DIST)'; \
607         for f in $$files; do \
608           if test -f $$f; then d=.; else d=$(srcdir); fi; \
609           cp $$d/$$f $(distdir) || exit 1; done
610
611 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
612         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
613                 case $$F in \
614                 gunix*.c|gdesktopappinfo.c) ;; \
615                 *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
616                      ;; \
617                 esac; \
618         done | sort -u >libgio.sourcefiles
619         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
620         rm libgio.sourcefiles
621
622 if HAVE_GLIB_RUNTIME_LIBDIR
623 install-data-hook:
624         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
625         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
626         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
627         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
628         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
629 endif