Merge branch '976-disable-assert-checks' into 'master'
[glib.git] / gio / Makefile.am
blob9dccb6829880a21d54a94e4c65b360c492ea0094
1 include $(top_srcdir)/glib.mk
3 SUBDIRS = gdbus-2.0/codegen
5 if OS_UNIX
6 SUBDIRS += xdgmime
7 endif
9 if OS_WIN32_AND_DLL_COMPILATION
10 if MS_LIB_AVAILABLE
11 noinst_DATA += gio-2.0.lib
13 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
14 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
15 endif
16 endif
18 install-ms-lib:
19         $(install_ms_lib_cmd)
21 uninstall-ms-lib:
22         $(uninstall_ms_lib_cmd)
24 AM_CPPFLAGS = \
25         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
26         $(gmodule_INCLUDES)                             \
27         $(GLIB_DEBUG_FLAGS)                             \
28         -DGIO_COMPILATION                               \
29         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
31 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
33 lib_LTLIBRARIES = libgio-2.0.la
35 gdbus_headers =                         \
36         gdbusauthobserver.h             \
37         gcredentials.h                  \
38         gdbusutils.h                    \
39         gdbuserror.h                    \
40         gdbusaddress.h                  \
41         gdbusconnection.h               \
42         gdbusmessage.h                  \
43         gdbusnameowning.h               \
44         gdbusnamewatching.h             \
45         gdbusproxy.h                    \
46         gdbusintrospection.h            \
47         gdbusmethodinvocation.h         \
48         gdbusserver.h                   \
49         gdbusinterface.h                \
50         gdbusinterfaceskeleton.h        \
51         gdbusobject.h                   \
52         gdbusobjectskeleton.h           \
53         gdbusobjectproxy.h              \
54         gdbusobjectmanager.h            \
55         gdbusobjectmanagerclient.h      \
56         gdbusobjectmanagerserver.h      \
57         gtestdbus.h                     \
58         $(NULL)
60 gdbus_sources =                                                         \
61         gdbusutils.h                    gdbusutils.c                    \
62         gdbusaddress.h                  gdbusaddress.c                  \
63         gdbusauthobserver.h             gdbusauthobserver.c             \
64         gdbusauth.h                     gdbusauth.c                     \
65         gdbusauthmechanism.h            gdbusauthmechanism.c            \
66         gdbusauthmechanismanon.h        gdbusauthmechanismanon.c        \
67         gdbusauthmechanismexternal.h    gdbusauthmechanismexternal.c    \
68         gdbusauthmechanismsha1.h        gdbusauthmechanismsha1.c        \
69         gdbuserror.h                    gdbuserror.c                    \
70         gdbusconnection.h               gdbusconnection.c               \
71         gdbusmessage.h                  gdbusmessage.c                  \
72         gdbusnameowning.h               gdbusnameowning.c               \
73         gdbusnamewatching.h             gdbusnamewatching.c             \
74         gdbusproxy.h                    gdbusproxy.c                    \
75         gdbusprivate.h                  gdbusprivate.c                  \
76         gdbusintrospection.h            gdbusintrospection.c            \
77         gdbusmethodinvocation.h         gdbusmethodinvocation.c         \
78         gdbusserver.h                   gdbusserver.c                   \
79         gdbusinterface.h                gdbusinterface.c                \
80         gdbusinterfaceskeleton.h        gdbusinterfaceskeleton.c        \
81         gdbusobject.h                   gdbusobject.c                   \
82         gdbusobjectskeleton.h           gdbusobjectskeleton.c           \
83         gdbusobjectproxy.h              gdbusobjectproxy.c              \
84         gdbusobjectmanager.h            gdbusobjectmanager.c            \
85         gdbusobjectmanagerclient.h      gdbusobjectmanagerclient.c      \
86         gdbusobjectmanagerserver.h      gdbusobjectmanagerserver.c      \
87         gtestdbus.h                     gtestdbus.c                     \
88         $(NULL)
90 # These are not built into the library yet
91 EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
93 GDBUS_PYTHON_DEPS =                                     \
94         $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in    \
95         $(srcdir)/gdbus-2.0/codegen/codegen_main.py     \
96         $(srcdir)/gdbus-2.0/codegen/parser.py           \
97         $(srcdir)/gdbus-2.0/codegen/codegen_docbook.py  \
98         $(srcdir)/gdbus-2.0/codegen/codegen.py          \
99         $(srcdir)/gdbus-2.0/codegen/__init__.py         \
100         $(srcdir)/gdbus-2.0/codegen/dbustypes.py        \
101         $(builddir)/gdbus-2.0/codegen/config.py         \
102         $(srcdir)/gdbus-2.0/codegen/utils.py
104 gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
105         $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
106                 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
107                 $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in \
108                 --interface-prefix org. \
109                 --generate-c-code gdbus-daemon-generated \
110                 --c-namespace _G \
111                 $(srcdir)/dbus-daemon.xml \
112                 $(NULL)
114 settings_headers = \
115         gsettingsbackend.h              \
116         gsettingsschema.h               \
117         gsettings.h
119 settings_base_sources = \
120         gvdb/gvdb-format.h              \
121         gvdb/gvdb-reader.h              \
122         gvdb/gvdb-reader.c              \
123         gdelayedsettingsbackend.h       \
124         gdelayedsettingsbackend.c       \
125         gkeyfilesettingsbackend.c       \
126         gmemorysettingsbackend.c        \
127         gnullsettingsbackend.c          \
128         gsettingsbackendinternal.h      \
129         gsettingsbackend.c              \
130         gsettingsschema.h               \
131         gsettingsschema-internal.h      \
132         gsettingsschema.c               \
133         gsettings-mapping.h             \
134         gsettings-mapping.c             \
135         gsettings.c
137 settings_sources = $(settings_base_sources)
139 if OS_WIN32
140 win32_settings_sources = \
141         gregistrysettingsbackend.h      \
142         gregistrysettingsbackend.c
144 settings_sources += $(win32_settings_sources)
145 endif
147 application_headers = \
148         gapplication.h                  \
149         gapplicationcommandline.h       \
150                                         \
151         gactiongroup.h                  \
152         gactionmap.h                    \
153         gsimpleactiongroup.h            \
154         gremoteactiongroup.h            \
155         gactiongroupexporter.h          \
156         gdbusactiongroup.h              \
157         gaction.h                       \
158         gpropertyaction.h               \
159         gsimpleaction.h                 \
160                                         \
161         gmenumodel.h                    \
162         gmenu.h                         \
163         gmenuexporter.h                 \
164         gdbusmenumodel.h                \
165         gnotification.h                 \
166         $(NULL)
168 application_sources = \
169         gapplication.c                          \
170         gapplicationcommandline.c               \
171         gapplicationimpl-dbus.c                 \
172         gapplicationimpl.h                      \
173                                                 \
174         gactiongroup.c                          \
175         gactionmap.c                            \
176         gsimpleactiongroup.c                    \
177         gremoteactiongroup.c                    \
178         gactiongroupexporter.c                  \
179         gdbusactiongroup-private.h              \
180         gdbusactiongroup.c                      \
181         gaction.c                               \
182         gpropertyaction.c                       \
183         gsimpleaction.c                         \
184                                                 \
185         gmenumodel.c                            \
186         gmenu.c                                 \
187         gmenuexporter.c                         \
188         gdbusmenumodel.c                        \
189         gnotification-private.h                 \
190         gnotificationbackend.h                  \
191         gnotification.c                         \
192         gnotificationbackend.c                  \
193         $(NULL)
195 local_sources = \
196         ghttpproxy.c                    \
197         ghttpproxy.h                    \
198         glocalfile.c                    \
199         glocalfile.h                    \
200         glocalfileprivate.h             \
201         glocalfileenumerator.c          \
202         glocalfileenumerator.h          \
203         glocalfileinfo.c                \
204         glocalfileinfo.h                \
205         glocalfileinputstream.c         \
206         glocalfileinputstream.h         \
207         glocalfilemonitor.c             \
208         glocalfilemonitor.h             \
209         glocalfileoutputstream.c        \
210         glocalfileoutputstream.h        \
211         glocalfileiostream.c            \
212         glocalfileiostream.h            \
213         glocalvfs.c                     \
214         glocalvfs.h                     \
215         gsocks4proxy.c                  \
216         gsocks4proxy.h                  \
217         gsocks4aproxy.c                 \
218         gsocks4aproxy.h                 \
219         gsocks5proxy.c                  \
220         gsocks5proxy.h                  \
221         thumbnail-verify.h              \
222         thumbnail-verify.c              \
223         $(NULL)
225 platform_libadd =
226 platform_deps =
227 appinfo_sources =
228 appinfo_headers =
229 contenttype_sources =
231 if HAVE_INOTIFY
232 SUBDIRS += inotify
233 platform_libadd += inotify/libinotify.la
234 platform_deps += inotify/libinotify.la
235 endif
237 if HAVE_KQUEUE
238 SUBDIRS += kqueue
239 platform_libadd += kqueue/libkqueue.la
240 platform_deps += kqueue/libkqueue.la
241 endif
243 if OS_WIN32
244 SUBDIRS += win32
245 platform_libadd += win32/libgiowin32.la
246 platform_deps += win32/libgiowin32.la
247 endif
249 SUBDIRS += . tests
251 if HAVE_FAM
252 SUBDIRS += fam
253 endif
255 if OS_UNIX
256 platform_libadd += xdgmime/libxdgmime.la
257 platform_deps += xdgmime/libxdgmime.la
258 if !OS_COCOA
259 appinfo_headers += gdesktopappinfo.h
260 endif
263 unix_sources = \
264         gfiledescriptorbased.c  \
265         gunixconnection.c       \
266         gunixcredentialsmessage.c       \
267         gunixfdlist.c           \
268         gunixfdmessage.c        \
269         gunixmount.c            \
270         gunixmount.h            \
271         gunixmounts.c           \
272         gunixsocketaddress.c    \
273         gunixvolume.c           \
274         gunixvolume.h           \
275         gunixvolumemonitor.c    \
276         gunixvolumemonitor.h    \
277         gunixinputstream.c      \
278         gunixoutputstream.c     \
279         gcontenttypeprivate.h   \
280         gfdonotificationbackend.c \
281         ggtknotificationbackend.c \
282         gportalnotificationbackend.c \
283         gdocumentportal.c       \
284         gdocumentportal.h       \
285         gopenuriportal.c        \
286         gopenuriportal.h        \
287         gportalsupport.c        \
288         gportalsupport.h        \
289         $(portal_sources)       \
290         $(NULL)
292 giounixincludedir=$(includedir)/gio-unix-2.0/gio
293 giounixinclude_HEADERS = \
294         gfiledescriptorbased.h  \
295         gunixconnection.h       \
296         gunixcredentialsmessage.h       \
297         gunixmounts.h           \
298         gunixfdlist.h           \
299         gunixfdmessage.h        \
300         gunixinputstream.h      \
301         gunixoutputstream.h     \
302         gunixsocketaddress.h    \
303         $(appinfo_headers) \
304         $(NULL)
306 if HAVE_NETLINK
307 unix_sources +=                  \
308         gnetworkmonitornetlink.c \
309         gnetworkmonitornetlink.h \
310         gnetworkmonitornm.c      \
311         gnetworkmonitornm.h      \
312         $(NULL)
313 endif
314 endif
316 gdbus_daemon_sources = \
317         gdbusdaemon.c \
318         gdbusdaemon.h \
319         gdbus-daemon-generated.c \
320         gdbus-daemon-generated.h \
321         $(NULL)
323 win32_actual_sources = \
324         $(gdbus_daemon_sources) \
325         gwin32registrykey.c \
326         gwin32registrykey.h \
327         gwin32mount.c \
328         gwin32mount.h \
329         gwin32volumemonitor.c \
330         gwin32volumemonitor.h \
331         gwin32inputstream.c \
332         gwin32outputstream.c \
333         gwin32outputstream.h \
334         gwin32networking.h \
335         gwin32networkmonitor.c \
336         gwin32networkmonitor.h \
337         gwin32notificationbackend.c \
338         $(NULL)
340 win32_more_sources_for_vcproj = \
341         gwin32appinfo.c \
342         gcontenttype-win32.c \
343         gregistrysettingsbackend.c \
344         win32/gwinhttpfile.c \
345         win32/gwinhttpfileinputstream.c \
346         win32/gwinhttpfileoutputstream.c \
347         win32/gwinhttpvfs.c \
348         win32/gwin32fsmonitorutils.c \
349         win32/gwin32filemonitor.c
351 if OS_WIN32
352 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
353 contenttype_sources += gcontenttype-win32.c
354 platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
355 win32_sources = $(win32_actual_sources)
357 giowin32includedir=$(includedir)/gio-win32-2.0/gio
358 giowin32include_HEADERS = \
359         gwin32inputstream.h \
360         gwin32outputstream.h \
361         $(NULL)
363 endif
365 xdp_dbus_built_sources = xdp-dbus.c xdp-dbus.h
366 BUILT_SOURCES += $(xdp_dbus_built_sources)
367 CLEANFILES += $(xdp_dbus_built_sources)
369 portal_interfaces = \
370         org.freedesktop.portal.Documents.xml \
371         org.freedesktop.portal.OpenURI.xml \
372         org.freedesktop.portal.NetworkMonitor.xml \
373         org.freedesktop.portal.ProxyResolver.xml \
374         $(NULL)
376 EXTRA_DIST += $(portal_interfaces)
378 $(xdp_dbus_built_sources) : $(portal_interfaces)
379         $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir)               \
380                 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir)               \
381                 $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in  \
382                 --interface-prefix org.freedesktop.portal.              \
383                 --c-namespace GXdp                                      \
384                 --generate-c-code $(builddir)/xdp-dbus                  \
385                 --annotate "org.freedesktop.portal.Documents.Add()" "org.gtk.GDBus.C.UnixFD" "true" \
386                 --annotate "org.freedesktop.portal.Documents.AddNamed()" "org.gtk.GDBus.C.UnixFD" "true" \
387                 --annotate "org.freedesktop.portal.Documents.AddFull()" "org.gtk.GDBus.C.UnixFD" "true" \
388                 --annotate "org.freedesktop.portal.OpenURI.OpenFile()" "org.gtk.GDBus.C.UnixFD" "true" \
389                 $^
391 portal_sources = \
392         gnetworkmonitorportal.c         \
393         gnetworkmonitorportal.h         \
394         gproxyresolverportal.c          \
395         gproxyresolverportal.h          \
396         $(xdp_dbus_built_sources)       \
397         $(NULL)
399 if OS_UNIX
400 if !OS_COCOA
401 contenttype_sources += gcontenttype.c
402 appinfo_sources += gdesktopappinfo.c
403 endif
404 endif
406 gio_base_sources =              \
407         gappinfo.c              \
408         gappinfoprivate.h       \
409         gasynchelper.c          \
410         gasynchelper.h          \
411         gasyncinitable.c        \
412         gasyncresult.c          \
413         gbufferedinputstream.c  \
414         gbufferedoutputstream.c \
415         gbytesicon.c            \
416         gcancellable.c          \
417         gcharsetconverter.c     \
418         gcontextspecificgroup.c \
419         gcontextspecificgroup.h \
420         gconverter.c            \
421         gconverterinputstream.c \
422         gconverteroutputstream.c        \
423         gcredentials.c          \
424         gcredentialsprivate.h   \
425         gdatagrambased.c        \
426         gdatainputstream.c      \
427         gdataoutputstream.c     \
428         gdrive.c                \
429         gdummyfile.h            \
430         gdummyfile.c            \
431         gdummyproxyresolver.c   \
432         gdummyproxyresolver.h   \
433         gdummytlsbackend.c      \
434         gdummytlsbackend.h      \
435         gemblem.h               \
436         gemblem.c               \
437         gemblemedicon.h         \
438         gemblemedicon.c         \
439         gfile.c                 \
440         gfileattribute.c        \
441         gfileattribute-priv.h   \
442         gfileenumerator.c       \
443         gfileicon.c             \
444         gfileinfo.c             \
445         gfileinfo-priv.h        \
446         gfileinputstream.c      \
447         gfilemonitor.c          \
448         gfilenamecompleter.c    \
449         gfileoutputstream.c     \
450         gfileiostream.c         \
451         gfilterinputstream.c    \
452         gfilteroutputstream.c   \
453         gicon.c                 \
454         ginetaddress.c          \
455         ginetaddressmask.c      \
456         ginetsocketaddress.c    \
457         ginitable.c             \
458         ginputstream.c          \
459         gio_probes.d            \
460         gio_trace.h             \
461         gioenums.h              \
462         gioerror.c              \
463         giomodule.c             \
464         giomodule-priv.c        \
465         giomodule-priv.h        \
466         gioscheduler.c          \
467         giostream.c             \
468         gioprivate.h            \
469         giowin32-priv.h         \
470         gloadableicon.c         \
471         gmount.c                \
472         gmemoryinputstream.c    \
473         gmemoryoutputstream.c   \
474         gmountoperation.c       \
475         gnativevolumemonitor.c  \
476         gnativevolumemonitor.h  \
477         gnativesocketaddress.c  \
478         gnativesocketaddress.h  \
479         gnetworkaddress.c       \
480         gnetworking.c           \
481         gnetworkingprivate.h    \
482         gnetworkmonitor.c       \
483         gnetworkmonitorbase.c   \
484         gnetworkmonitorbase.h   \
485         gnetworkservice.c       \
486         goutputstream.c         \
487         gpermission.c           \
488         gpollableinputstream.c  \
489         gpollableoutputstream.c \
490         gpollableutils.c        \
491         gpollfilemonitor.c      \
492         gpollfilemonitor.h      \
493         gproxy.c                \
494         gproxyaddress.c         \
495         gproxyaddressenumerator.c \
496         gproxyresolver.c        \
497         gresolver.c             \
498         gresource.c             \
499         gresourcefile.c         \
500         gresourcefile.h         \
501         gseekable.c             \
502         gsimpleasyncresult.c    \
503         gsimpleiostream.c       \
504         gsimplepermission.c     \
505         gsocket.c               \
506         gsocketaddress.c        \
507         gsocketaddressenumerator.c \
508         gsocketclient.c         \
509         gsocketconnectable.c    \
510         gsocketconnection.c     \
511         gsocketcontrolmessage.c \
512         gsocketinputstream.c    \
513         gsocketinputstream.h    \
514         gsocketlistener.c       \
515         gsocketoutputstream.c   \
516         gsocketoutputstream.h   \
517         gsubprocesslauncher.c   \
518         gsubprocess.c           \
519         gsubprocesslauncher-private.h   \
520         gsocketservice.c        \
521         gsrvtarget.c            \
522         gsimpleproxyresolver.c  \
523         gtask.c                 \
524         gtcpconnection.c        \
525         gtcpwrapperconnection.c \
526         gthreadedsocketservice.c\
527         gthemedicon.c           \
528         gthreadedresolver.c     \
529         gthreadedresolver.h     \
530         gtlsbackend.c           \
531         gtlscertificate.c       \
532         gtlsclientconnection.c  \
533         gtlsconnection.c        \
534         gtlsdatabase.c          \
535         gtlsfiledatabase.c      \
536         gtlsinteraction.c       \
537         gtlspassword.c          \
538         gtlsserverconnection.c  \
539         gdtlsconnection.c       \
540         gdtlsclientconnection.c \
541         gdtlsserverconnection.c \
542         gunionvolumemonitor.c   \
543         gunionvolumemonitor.h   \
544         gvfs.c                  \
545         gvolume.c               \
546         gvolumemonitor.c        \
547         gzlibcompressor.c       \
548         gzlibdecompressor.c     \
549         gmountprivate.h         \
550         gioenumtypes.h          \
551         gioenumtypes.c          \
552         glistmodel.c            \
553         gliststore.c            \
554         $(application_sources)  \
555         $(gdbus_sources)        \
556         $(local_sources)        \
557         $(NULL)
559 libgio_2_0_la_SOURCES =         \
560         $(gio_base_sources)     \
561         $(appinfo_sources)      \
562         $(contenttype_sources) \
563         $(unix_sources)         \
564         $(win32_sources)        \
565         $(settings_sources)     \
566         $(NULL)
568 EXTRA_DIST += strinfo.c
570 libgio_2_0_la_LIBADD = \
571         $(top_builddir)/gobject/libgobject-2.0.la       \
572         $(top_builddir)/gmodule/libgmodule-2.0.la       \
573         $(top_builddir)/glib/libglib-2.0.la             \
574         $(platform_libadd)                              \
575         $(ZLIB_LIBS)                                    \
576         $(SELINUX_LIBS)                                 \
577         $(GLIB_LIBS)                                    \
578         $(XATTR_LIBS)                                   \
579         $(NETWORK_LIBS)                                 \
580         $(NULL)
582 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
584 if PLATFORM_WIN32
585 no_undefined = -no-undefined
586 endif
588 if OS_WIN32_AND_DLL_COMPILATION
589 gio_win32_res = gio-win32-res.o
590 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
591 endif
593 install-data-local: install-ms-lib
594         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
596 uninstall-local: uninstall-ms-lib
598 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
599 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
600         $(gio_win32_res_ldflag) \
601         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
602         -export-dynamic $(no_undefined)
604 # We cannot build .m files because it would require adding AC_PROG_OBJC in
605 # configure.ac, and it cannot be added conditionally. That means we would always
606 # depend on an objective-c compiler even when not needed. To work around that
607 # limitation we rename .m files to .c and compile them separately with
608 # -xobjective-c into an intermediary library. Note that we cannot rename those
609 # files to .c directly in the source tree because Meson needs the .m extension.
610 # This must be done outside of "if OS_COCOA" block otherwise distcheck fails.
611 # See https://bugzilla.gnome.org/show_bug.cgi?id=672777.
612 OBJC_FILES = \
613         gnextstepsettingsbackend.m \
614         gosxcontenttype.m \
615         gosxappinfo.m \
616         gcocoanotificationbackend.m \
617         $(NULL)
618 OBJC_C_FILES = $(OBJC_FILES:.m=.c)
619 BUILT_SOURCES += $(OBJC_C_FILES)
620 CLEANFILES += $(OBJC_C_FILES)
621 EXTRA_DIST += $(OBJC_FILES)
622 $(OBJC_C_FILES): %.c: %.m Makefile
623         cp $< $@
625 if OS_COCOA
626 libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c
627 libgio_objc_2_0_la_CPPFLAGS = $(libgio_2_0_la_CPPFLAGS)
628 libgio_objc_2_0_la_LDFLAGS = $(libgio_2_0_la_LDFLAGS) -Wl,-framework,Foundation -Wl,-framework,AppKit
629 libgio_objc_2_0_la_SOURCES = \
630         gnextstepsettingsbackend.c \
631         gosxcontenttype.c \
632         gosxappinfo.c \
633         gosxappinfo.h
634 if MAC_OS_X_9
635 libgio_objc_2_0_la_SOURCES += \
636         gcocoanotificationbackend.c
637 endif
639 noinst_LTLIBRARIES += libgio-objc-2.0.la
640 libgio_2_0_la_LIBADD += libgio-objc-2.0.la
641 endif
643 if HAVE_LIBMOUNT
644 libgio_2_0_la_CFLAGS += $(LIBMOUNT_CFLAGS)
645 libgio_2_0_la_LIBADD += $(LIBMOUNT_LIBS)
646 endif
648 EXTRA_libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
650 gio-win32-res.o: gio.rc
651         $(WINDRES) gio.rc $@
653 gio_headers =                   \
654         gappinfo.h              \
655         gasyncinitable.h        \
656         gasyncresult.h          \
657         gbufferedinputstream.h  \
658         gbufferedoutputstream.h \
659         gbytesicon.h            \
660         gcancellable.h          \
661         gcontenttype.h          \
662         gcharsetconverter.h     \
663         gconverter.h            \
664         gconverterinputstream.h \
665         gconverteroutputstream.h        \
666         gdatagrambased.h        \
667         gdatainputstream.h      \
668         gdataoutputstream.h     \
669         gdrive.h                \
670         gemblem.h               \
671         gemblemedicon.h         \
672         gfile.h                 \
673         gfileattribute.h        \
674         gfileenumerator.h       \
675         gfileicon.h             \
676         gfileinfo.h             \
677         gfileinputstream.h      \
678         gfilemonitor.h          \
679         gfilenamecompleter.h    \
680         gfileoutputstream.h     \
681         gfileiostream.h         \
682         gfilterinputstream.h    \
683         gfilteroutputstream.h   \
684         gicon.h                 \
685         ginetaddress.h          \
686         ginetaddressmask.h      \
687         ginetsocketaddress.h    \
688         ginputstream.h          \
689         ginitable.h             \
690         gio.h                   \
691         gio-autocleanups.h      \
692         giotypes.h              \
693         gioenums.h              \
694         gioerror.h              \
695         giomodule.h             \
696         gioscheduler.h          \
697         giostream.h             \
698         gloadableicon.h         \
699         gmount.h                \
700         gmemoryinputstream.h    \
701         gmemoryoutputstream.h   \
702         gmountoperation.h       \
703         gnativevolumemonitor.h  \
704         gnetworkaddress.h       \
705         gnetworkmonitor.h       \
706         gnetworkservice.h       \
707         goutputstream.h         \
708         gpermission.h           \
709         gpollableinputstream.h  \
710         gpollableoutputstream.h \
711         gpollableutils.h        \
712         gproxyaddress.h         \
713         gproxy.h                \
714         gproxyaddressenumerator.h \
715         gproxyresolver.h        \
716         gresolver.h             \
717         gresource.h             \
718         gseekable.h             \
719         gsimpleasyncresult.h    \
720         gsimpleiostream.h       \
721         gsimplepermission.h     \
722         gsocket.h               \
723         gsocketaddress.h        \
724         gsocketaddressenumerator.h \
725         gsocketclient.h         \
726         gsocketconnectable.h    \
727         gsocketconnection.h     \
728         gsocketcontrolmessage.h \
729         gsocketlistener.h       \
730         gsocketservice.h        \
731         gsrvtarget.h            \
732         gsimpleproxyresolver.h  \
733         gtask.h                 \
734         gsubprocess.h           \
735         gsubprocesslauncher.h   \
736         gtcpconnection.h        \
737         gtcpwrapperconnection.h \
738         gthreadedsocketservice.h\
739         gthemedicon.h           \
740         gtlsbackend.h           \
741         gtlscertificate.h       \
742         gtlsclientconnection.h  \
743         gtlsconnection.h        \
744         gtlsdatabase.h          \
745         gtlsfiledatabase.h      \
746         gtlsinteraction.h       \
747         gtlspassword.h          \
748         gtlsserverconnection.h  \
749         gdtlsconnection.h       \
750         gdtlsclientconnection.h \
751         gdtlsserverconnection.h \
752         gvfs.h                  \
753         gvolume.h               \
754         gvolumemonitor.h        \
755         gzlibcompressor.h       \
756         gzlibdecompressor.h     \
757         glistmodel.h            \
758         gliststore.h            \
759         $(application_headers)  \
760         $(settings_headers)     \
761         $(gdbus_headers)        \
762         $(NULL)
764 gioincludedir=$(includedir)/glib-2.0/gio/
765 gioinclude_HEADERS =            \
766         $(gio_headers)          \
767         gioenumtypes.h
769 nodist_gioinclude_HEADERS =     \
770         gnetworking.h           \
771         $(NULL)
773 # these sources (also mentioned above) are generated.
774 BUILT_SOURCES +=                \
775         gconstructor_as_data.h  \
776         gioenumtypes.h          \
777         gioenumtypes.c          \
778         gdbus-daemon-generated.c \
779         gdbus-daemon-generated.h \
780         gnetworking.h           \
781         $(NULL)
783 EXTRA_DIST +=                   \
784         data-to-c.py            \
785         gioenumtypes.h.template \
786         gioenumtypes.c.template \
787         gio.rc.in               \
788         gschema.dtd             \
789         gconstructor_as_data.h  \
790         $(NULL)
792 BUILT_EXTRA_DIST +=             \
793         gio.rc
795 # This is read by gobject-introspection/misc/ and gtk-doc
796 gio-public-headers.txt: Makefile
797         $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
799 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
802 DISTCLEANFILES +=               \
803         gioenumtypes.h          \
804         gioenumtypes.c
806 all-local: gio-public-headers.txt
808 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
809         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
810             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
812 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
813         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
814             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
816 gio.def: libgio-2.0.la
817         $(AM_V_GEN) dumpbin.exe -exports .libs/libgio-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gio.def.tmp && mv gio.def.tmp gio.def
819 gio-2.0.lib: libgio-2.0.la gio.def
820         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
822 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings gio-launch-desktop
824 glib_compile_resources_LDADD = libgio-2.0.la            \
825         $(top_builddir)/gobject/libgobject-2.0.la       \
826         $(top_builddir)/gmodule/libgmodule-2.0.la       \
827         $(top_builddir)/glib/libglib-2.0.la             \
828         $(NULL)
830 glib_compile_resources_SOURCES = \
831         gvdb/gvdb-format.h              \
832         gvdb/gvdb-builder.h             \
833         gvdb/gvdb-builder.c             \
834         glib-compile-resources.c
836 gio_querymodules_SOURCES = gio-querymodules.c giomodule-priv.c
837 gio_querymodules_LDADD   = libgio-2.0.la                \
838         $(top_builddir)/gobject/libgobject-2.0.la       \
839         $(top_builddir)/gmodule/libgmodule-2.0.la       \
840         $(top_builddir)/glib/libglib-2.0.la             \
841         $(NULL)
843 gio_launch_desktop_SOURCES = gio-launch-desktop.c
845 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
846         $(AM_V_GEN) $(srcdir)/data-to-c.py $(top_srcdir)/glib/gconstructor.h gconstructor_code $@
848 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
849 glib_compile_schemas_SOURCES = \
850         gconstructor_as_data.h \
851         gvdb/gvdb-format.h              \
852         gvdb/gvdb-builder.h             \
853         gvdb/gvdb-builder.c             \
854         glib-compile-schemas.c
856 gsettings_LDADD = libgio-2.0.la                         \
857         $(top_builddir)/gobject/libgobject-2.0.la       \
858         $(top_builddir)/gmodule/libgmodule-2.0.la       \
859         $(top_builddir)/glib/libglib-2.0.la             \
860         $(NULL)
861 gsettings_SOURCES = gsettings-tool.c
863 schemadir = $(datadir)/glib-2.0/schemas
864 dist_schema_DATA = gschema.dtd
866 itsdir = $(datadir)/gettext/its
867 dist_its_DATA = gschema.loc gschema.its
869 # ------------------------------------------------------------------------
870 # SystemTap and dtrace
872 if ENABLE_DTRACE
873 gio_probes.h: gio_probes.d
874         $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
875         @$(SED) \
876                 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
877                 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
878                 < $@.tmp > $@ && rm -f $@.tmp
880 gio_probes.lo: gio_probes.d
881         $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
883 BUILT_SOURCES += gio_probes.h gio_probes.lo
884 CLEANFILES += gio_probes.h gio_probes.h.tmp
885 libgio_2_0_la_LIBADD += gio_probes.lo
886 endif
888 tapsetdir   = @ABS_TAPSET_DIR@
889 EXTRA_DIST += gio.stp.in
891 if ENABLE_SYSTEMTAP
892 tapset_DATA = libgio-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
893 CLEANFILES += $(tapset_DATA)
895 $(tapset_DATA): gio.stp.in Makefile
896         $(AM_V_GEN)$(SED) \
897                 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
898                 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
899                 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
900                 $< > $@
901 endif
903 # ------------------------------------------------------------------------
904 # gdbus(1) tool
906 bin_PROGRAMS += gdbus
907 gdbus_SOURCES = gdbus-tool.c
908 gdbus_LDADD = libgio-2.0.la                             \
909         $(top_builddir)/gobject/libgobject-2.0.la       \
910         $(top_builddir)/gmodule/libgmodule-2.0.la       \
911         $(top_builddir)/glib/libglib-2.0.la             \
912         $(NULL)
914 if OS_UNIX
915 if !OS_COCOA
916 # ------------------------------------------------------------------------
917 # gapplication(1) tool
918 bin_PROGRAMS += gapplication
919 gapplication_SOURCES = gapplication-tool.c
920 gapplication_LDADD = libgio-2.0.la                      \
921         $(top_builddir)/gobject/libgobject-2.0.la       \
922         $(top_builddir)/gmodule/libgmodule-2.0.la       \
923         $(top_builddir)/glib/libglib-2.0.la             \
924         $(NULL)
925 endif
926 endif
928 completiondir = $(datadir)/bash-completion/completions
929 completion_DATA = \
930         completion/gapplication                         \
931         completion/gdbus                                \
932         completion/gio                                  \
933         completion/gsettings                            \
934         completion/gresource
935 EXTRA_DIST += $(completion_DATA)
937 # ------------------------------------------------------------------------
938 # gresource tool
940 bin_PROGRAMS += gresource
941 gresource_SOURCES = gresource-tool.c
942 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
943 gresource_LDADD = libgio-2.0.la                         \
944         $(top_builddir)/gobject/libgobject-2.0.la       \
945         $(top_builddir)/gmodule/libgmodule-2.0.la       \
946         $(top_builddir)/glib/libglib-2.0.la             \
947         $(LIBELF_LIBS)
949 # ------------------------------------------------------------------------
950 # gio tool
952 bin_PROGRAMS += gio
953 gio_SOURCES = \
954         gio-tool.c                                      \
955         gio-tool.h                                      \
956         gio-tool-cat.c                                  \
957         gio-tool-copy.c                                 \
958         gio-tool-info.c                                 \
959         gio-tool-list.c                                 \
960         gio-tool-mime.c                                 \
961         gio-tool-mkdir.c                                \
962         gio-tool-monitor.c                              \
963         gio-tool-mount.c                                \
964         gio-tool-move.c                                 \
965         gio-tool-open.c                                 \
966         gio-tool-rename.c                               \
967         gio-tool-remove.c                               \
968         gio-tool-save.c                                 \
969         gio-tool-set.c                                  \
970         gio-tool-trash.c                                \
971         gio-tool-tree.c                                 \
972         $(NULL)
973 gio_LDADD = libgio-2.0.la                               \
974         $(top_builddir)/gobject/libgobject-2.0.la       \
975         $(top_builddir)/glib/libglib-2.0.la             \
976         $(NULL)
978 dist-hook: $(BUILT_EXTRA_DIST)
979         files='$(BUILT_EXTRA_DIST)'; \
980         for f in $$files; do \
981           if test -f $$f; then d=.; else d=$(srcdir); fi; \
982           cp $$d/$$f $(distdir) || exit 1; done
984 if HAVE_GLIB_RUNTIME_LIBDIR
985 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
986 else
987 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
988 endif
990 if HAVE_GLIB_RUNTIME_LIBDIR
991 install-data-hook:
992         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
993         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
994         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
995         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
996         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
997 endif