Merge branch 'test-ip_mreq_source-android-only' into 'master'
[glib.git] / gio / Makefile.am
blobe14cad2299a7e3abdde36c6042e2578788f271d5
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)
291 nodist_unix_sources = \
292         $(nodist_portal_sources) \
293         $(NULL)
295 giounixincludedir=$(includedir)/gio-unix-2.0/gio
296 giounixinclude_HEADERS = \
297         gfiledescriptorbased.h  \
298         gunixconnection.h       \
299         gunixcredentialsmessage.h       \
300         gunixmounts.h           \
301         gunixfdlist.h           \
302         gunixfdmessage.h        \
303         gunixinputstream.h      \
304         gunixoutputstream.h     \
305         gunixsocketaddress.h    \
306         $(appinfo_headers) \
307         $(NULL)
309 if HAVE_NETLINK
310 unix_sources +=                  \
311         gnetworkmonitornetlink.c \
312         gnetworkmonitornetlink.h \
313         gnetworkmonitornm.c      \
314         gnetworkmonitornm.h      \
315         $(NULL)
316 endif
317 endif
319 gdbus_daemon_sources = \
320         gdbusdaemon.c \
321         gdbusdaemon.h \
322         $(NULL)
323 nodist_gdbus_daemon_sources = \
324         gdbus-daemon-generated.c \
325         gdbus-daemon-generated.h \
326         $(NULL)
328 win32_actual_sources = \
329         $(gdbus_daemon_sources) \
330         gwin32registrykey.c \
331         gwin32registrykey.h \
332         gwin32mount.c \
333         gwin32mount.h \
334         gwin32volumemonitor.c \
335         gwin32volumemonitor.h \
336         gwin32inputstream.c \
337         gwin32outputstream.c \
338         gwin32outputstream.h \
339         gwin32networking.h \
340         gwin32networkmonitor.c \
341         gwin32networkmonitor.h \
342         gwin32notificationbackend.c \
343         $(NULL)
344 nodist_win32_actual_sources = \
345         $(nodist_gdbus_daemon_sources) \
346         $(NULL)
348 win32_more_sources_for_vcproj = \
349         gwin32appinfo.c \
350         gcontenttype-win32.c \
351         gregistrysettingsbackend.c \
352         win32/gwinhttpfile.c \
353         win32/gwinhttpfileinputstream.c \
354         win32/gwinhttpfileoutputstream.c \
355         win32/gwinhttpvfs.c \
356         win32/gwin32fsmonitorutils.c \
357         win32/gwin32filemonitor.c
359 if OS_WIN32
360 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
361 contenttype_sources += gcontenttype-win32.c
362 platform_libadd += -lshlwapi -lws2_32 -ldnsapi -liphlpapi
363 win32_sources = $(win32_actual_sources)
364 nodist_win32_sources = $(nodist_win32_actual_sources)
366 giowin32includedir=$(includedir)/gio-win32-2.0/gio
367 giowin32include_HEADERS = \
368         gwin32inputstream.h \
369         gwin32outputstream.h \
370         $(NULL)
372 endif
374 xdp_dbus_built_sources = xdp-dbus.c xdp-dbus.h
375 BUILT_SOURCES += $(xdp_dbus_built_sources)
376 CLEANFILES += $(xdp_dbus_built_sources)
378 portal_interfaces = \
379         org.freedesktop.portal.Documents.xml \
380         org.freedesktop.portal.OpenURI.xml \
381         org.freedesktop.portal.ProxyResolver.xml \
382         $(NULL)
384 EXTRA_DIST += $(portal_interfaces)
386 $(xdp_dbus_built_sources) : $(portal_interfaces)
387         $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir)               \
388                 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir)               \
389                 $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in  \
390                 --interface-prefix org.freedesktop.portal.              \
391                 --c-namespace GXdp                                      \
392                 --generate-c-code $(builddir)/xdp-dbus                  \
393                 --annotate "org.freedesktop.portal.Documents.Add()" "org.gtk.GDBus.C.UnixFD" "true" \
394                 --annotate "org.freedesktop.portal.Documents.AddNamed()" "org.gtk.GDBus.C.UnixFD" "true" \
395                 --annotate "org.freedesktop.portal.Documents.AddFull()" "org.gtk.GDBus.C.UnixFD" "true" \
396                 --annotate "org.freedesktop.portal.OpenURI.OpenFile()" "org.gtk.GDBus.C.UnixFD" "true" \
397                 $^
399 portal_sources = \
400         gnetworkmonitorportal.c         \
401         gnetworkmonitorportal.h         \
402         gproxyresolverportal.c          \
403         gproxyresolverportal.h          \
404         $(NULL)
405 nodist_portal_sources = \
406         $(xdp_dbus_built_sources) \
407         $(NULL)
409 if OS_UNIX
410 if !OS_COCOA
411 contenttype_sources += gcontenttype.c
412 appinfo_sources += gdesktopappinfo.c
413 endif
414 endif
416 gio_base_sources =              \
417         gappinfo.c              \
418         gappinfoprivate.h       \
419         gasynchelper.c          \
420         gasynchelper.h          \
421         gasyncinitable.c        \
422         gasyncresult.c          \
423         gbufferedinputstream.c  \
424         gbufferedoutputstream.c \
425         gbytesicon.c            \
426         gcancellable.c          \
427         gcharsetconverter.c     \
428         gcontextspecificgroup.c \
429         gcontextspecificgroup.h \
430         gconverter.c            \
431         gconverterinputstream.c \
432         gconverteroutputstream.c        \
433         gcredentials.c          \
434         gcredentialsprivate.h   \
435         gdatagrambased.c        \
436         gdatainputstream.c      \
437         gdataoutputstream.c     \
438         gdrive.c                \
439         gdummyfile.h            \
440         gdummyfile.c            \
441         gdummyproxyresolver.c   \
442         gdummyproxyresolver.h   \
443         gdummytlsbackend.c      \
444         gdummytlsbackend.h      \
445         gemblem.h               \
446         gemblem.c               \
447         gemblemedicon.h         \
448         gemblemedicon.c         \
449         gfile.c                 \
450         gfileattribute.c        \
451         gfileattribute-priv.h   \
452         gfileenumerator.c       \
453         gfileicon.c             \
454         gfileinfo.c             \
455         gfileinfo-priv.h        \
456         gfileinputstream.c      \
457         gfilemonitor.c          \
458         gfilenamecompleter.c    \
459         gfileoutputstream.c     \
460         gfileiostream.c         \
461         gfilterinputstream.c    \
462         gfilteroutputstream.c   \
463         gicon.c                 \
464         ginetaddress.c          \
465         ginetaddressmask.c      \
466         ginetsocketaddress.c    \
467         ginitable.c             \
468         ginputstream.c          \
469         gio_probes.d            \
470         gio_trace.h             \
471         gioenums.h              \
472         gioerror.c              \
473         giomodule.c             \
474         giomodule-priv.c        \
475         giomodule-priv.h        \
476         gioscheduler.c          \
477         giostream.c             \
478         gioprivate.h            \
479         giowin32-priv.h         \
480         gloadableicon.c         \
481         gmount.c                \
482         gmemoryinputstream.c    \
483         gmemoryoutputstream.c   \
484         gmountoperation.c       \
485         gnativevolumemonitor.c  \
486         gnativevolumemonitor.h  \
487         gnativesocketaddress.c  \
488         gnativesocketaddress.h  \
489         gnetworkaddress.c       \
490         gnetworking.c           \
491         gnetworkingprivate.h    \
492         gnetworkmonitor.c       \
493         gnetworkmonitorbase.c   \
494         gnetworkmonitorbase.h   \
495         gnetworkservice.c       \
496         goutputstream.c         \
497         gpermission.c           \
498         gpollableinputstream.c  \
499         gpollableoutputstream.c \
500         gpollableutils.c        \
501         gpollfilemonitor.c      \
502         gpollfilemonitor.h      \
503         gproxy.c                \
504         gproxyaddress.c         \
505         gproxyaddressenumerator.c \
506         gproxyresolver.c        \
507         gresolver.c             \
508         gresource.c             \
509         gresourcefile.c         \
510         gresourcefile.h         \
511         gseekable.c             \
512         gsimpleasyncresult.c    \
513         gsimpleiostream.c       \
514         gsimplepermission.c     \
515         gsocket.c               \
516         gsocketaddress.c        \
517         gsocketaddressenumerator.c \
518         gsocketclient.c         \
519         gsocketconnectable.c    \
520         gsocketconnection.c     \
521         gsocketcontrolmessage.c \
522         gsocketinputstream.c    \
523         gsocketinputstream.h    \
524         gsocketlistener.c       \
525         gsocketoutputstream.c   \
526         gsocketoutputstream.h   \
527         gsubprocesslauncher.c   \
528         gsubprocess.c           \
529         gsubprocesslauncher-private.h   \
530         gsocketservice.c        \
531         gsrvtarget.c            \
532         gsimpleproxyresolver.c  \
533         gtask.c                 \
534         gtcpconnection.c        \
535         gtcpwrapperconnection.c \
536         gthreadedsocketservice.c\
537         gthemedicon.c           \
538         gthreadedresolver.c     \
539         gthreadedresolver.h     \
540         gtlsbackend.c           \
541         gtlscertificate.c       \
542         gtlsclientconnection.c  \
543         gtlsconnection.c        \
544         gtlsdatabase.c          \
545         gtlsfiledatabase.c      \
546         gtlsinteraction.c       \
547         gtlspassword.c          \
548         gtlsserverconnection.c  \
549         gdtlsconnection.c       \
550         gdtlsclientconnection.c \
551         gdtlsserverconnection.c \
552         gunionvolumemonitor.c   \
553         gunionvolumemonitor.h   \
554         gvfs.c                  \
555         gvolume.c               \
556         gvolumemonitor.c        \
557         gzlibcompressor.c       \
558         gzlibdecompressor.c     \
559         gmountprivate.h         \
560         glistmodel.c            \
561         gliststore.c            \
562         $(application_sources)  \
563         $(gdbus_sources)        \
564         $(local_sources)        \
565         $(NULL)
566 nodist_gio_base_sources = \
567         gioenumtypes.h \
568         gioenumtypes.c \
569         $(NULL)
571 libgio_2_0_la_SOURCES =         \
572         $(gio_base_sources)     \
573         $(appinfo_sources)      \
574         $(contenttype_sources) \
575         $(unix_sources)         \
576         $(win32_sources)        \
577         $(settings_sources)     \
578         $(NULL)
579 nodist_libgio_2_0_la_SOURCES = \
580         $(nodist_gio_base_sources) \
581         $(nodist_unix_sources) \
582         $(nodist_win32_sources) \
583         $(NULL)
585 EXTRA_DIST += strinfo.c
587 libgio_2_0_la_LIBADD = \
588         $(top_builddir)/gobject/libgobject-2.0.la       \
589         $(top_builddir)/gmodule/libgmodule-2.0.la       \
590         $(top_builddir)/glib/libglib-2.0.la             \
591         $(platform_libadd)                              \
592         $(ZLIB_LIBS)                                    \
593         $(SELINUX_LIBS)                                 \
594         $(GLIB_LIBS)                                    \
595         $(XATTR_LIBS)                                   \
596         $(NETWORK_LIBS)                                 \
597         $(NULL)
599 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
601 if PLATFORM_WIN32
602 no_undefined = -no-undefined
603 endif
605 if OS_WIN32_AND_DLL_COMPILATION
606 gio_win32_res = gio-win32-res.o
607 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
608 endif
610 install-data-local: install-ms-lib
611         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
613 uninstall-local: uninstall-ms-lib
615 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
616 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
617         $(gio_win32_res_ldflag) \
618         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
619         -export-dynamic $(no_undefined)
621 # We cannot build .m files because it would require adding AC_PROG_OBJC in
622 # configure.ac, and it cannot be added conditionally. That means we would always
623 # depend on an objective-c compiler even when not needed. To work around that
624 # limitation we rename .m files to .c and compile them separately with
625 # -xobjective-c into an intermediary library. Note that we cannot rename those
626 # files to .c directly in the source tree because Meson needs the .m extension.
627 # This must be done outside of "if OS_COCOA" block otherwise distcheck fails.
628 # See https://bugzilla.gnome.org/show_bug.cgi?id=672777.
629 OBJC_FILES = \
630         gnextstepsettingsbackend.m \
631         gosxcontenttype.m \
632         gosxappinfo.m \
633         gcocoanotificationbackend.m \
634         $(NULL)
635 OBJC_C_FILES = $(OBJC_FILES:.m=.c)
636 BUILT_SOURCES += $(OBJC_C_FILES)
637 CLEANFILES += $(OBJC_C_FILES)
638 EXTRA_DIST += $(OBJC_FILES)
639 $(OBJC_C_FILES): %.c: %.m Makefile
640         cp $< $@
642 if OS_COCOA
643 libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c
644 libgio_objc_2_0_la_CPPFLAGS = $(libgio_2_0_la_CPPFLAGS)
645 libgio_objc_2_0_la_LDFLAGS = $(libgio_2_0_la_LDFLAGS) -Wl,-framework,Foundation -Wl,-framework,AppKit
646 libgio_objc_2_0_la_SOURCES = \
647         gnextstepsettingsbackend.c \
648         gosxcontenttype.c \
649         gosxappinfo.c \
650         gosxappinfo.h
651 if MAC_OS_X_9
652 libgio_objc_2_0_la_SOURCES += \
653         gcocoanotificationbackend.c
654 endif
656 noinst_LTLIBRARIES += libgio-objc-2.0.la
657 libgio_2_0_la_LIBADD += libgio-objc-2.0.la
658 endif
660 if HAVE_LIBMOUNT
661 libgio_2_0_la_CFLAGS += $(LIBMOUNT_CFLAGS)
662 libgio_2_0_la_LIBADD += $(LIBMOUNT_LIBS)
663 endif
665 EXTRA_libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
667 gio-win32-res.o: gio.rc
668         $(WINDRES) gio.rc $@
670 gio_headers =                   \
671         gappinfo.h              \
672         gasyncinitable.h        \
673         gasyncresult.h          \
674         gbufferedinputstream.h  \
675         gbufferedoutputstream.h \
676         gbytesicon.h            \
677         gcancellable.h          \
678         gcontenttype.h          \
679         gcharsetconverter.h     \
680         gconverter.h            \
681         gconverterinputstream.h \
682         gconverteroutputstream.h        \
683         gdatagrambased.h        \
684         gdatainputstream.h      \
685         gdataoutputstream.h     \
686         gdrive.h                \
687         gemblem.h               \
688         gemblemedicon.h         \
689         gfile.h                 \
690         gfileattribute.h        \
691         gfileenumerator.h       \
692         gfileicon.h             \
693         gfileinfo.h             \
694         gfileinputstream.h      \
695         gfilemonitor.h          \
696         gfilenamecompleter.h    \
697         gfileoutputstream.h     \
698         gfileiostream.h         \
699         gfilterinputstream.h    \
700         gfilteroutputstream.h   \
701         gicon.h                 \
702         ginetaddress.h          \
703         ginetaddressmask.h      \
704         ginetsocketaddress.h    \
705         ginputstream.h          \
706         ginitable.h             \
707         gio.h                   \
708         gio-autocleanups.h      \
709         giotypes.h              \
710         gioenums.h              \
711         gioerror.h              \
712         giomodule.h             \
713         gioscheduler.h          \
714         giostream.h             \
715         gloadableicon.h         \
716         gmount.h                \
717         gmemoryinputstream.h    \
718         gmemoryoutputstream.h   \
719         gmountoperation.h       \
720         gnativevolumemonitor.h  \
721         gnetworkaddress.h       \
722         gnetworkmonitor.h       \
723         gnetworkservice.h       \
724         goutputstream.h         \
725         gpermission.h           \
726         gpollableinputstream.h  \
727         gpollableoutputstream.h \
728         gpollableutils.h        \
729         gproxyaddress.h         \
730         gproxy.h                \
731         gproxyaddressenumerator.h \
732         gproxyresolver.h        \
733         gresolver.h             \
734         gresource.h             \
735         gseekable.h             \
736         gsimpleasyncresult.h    \
737         gsimpleiostream.h       \
738         gsimplepermission.h     \
739         gsocket.h               \
740         gsocketaddress.h        \
741         gsocketaddressenumerator.h \
742         gsocketclient.h         \
743         gsocketconnectable.h    \
744         gsocketconnection.h     \
745         gsocketcontrolmessage.h \
746         gsocketlistener.h       \
747         gsocketservice.h        \
748         gsrvtarget.h            \
749         gsimpleproxyresolver.h  \
750         gtask.h                 \
751         gsubprocess.h           \
752         gsubprocesslauncher.h   \
753         gtcpconnection.h        \
754         gtcpwrapperconnection.h \
755         gthreadedsocketservice.h\
756         gthemedicon.h           \
757         gtlsbackend.h           \
758         gtlscertificate.h       \
759         gtlsclientconnection.h  \
760         gtlsconnection.h        \
761         gtlsdatabase.h          \
762         gtlsfiledatabase.h      \
763         gtlsinteraction.h       \
764         gtlspassword.h          \
765         gtlsserverconnection.h  \
766         gdtlsconnection.h       \
767         gdtlsclientconnection.h \
768         gdtlsserverconnection.h \
769         gvfs.h                  \
770         gvolume.h               \
771         gvolumemonitor.h        \
772         gzlibcompressor.h       \
773         gzlibdecompressor.h     \
774         glistmodel.h            \
775         gliststore.h            \
776         $(application_headers)  \
777         $(settings_headers)     \
778         $(gdbus_headers)        \
779         $(NULL)
781 gioincludedir=$(includedir)/glib-2.0/gio/
782 gioinclude_HEADERS = \
783         $(gio_headers) \
784         $(NULL)
785 nodist_gioinclude_HEADERS = \
786         gioenumtypes.h \
787         gnetworking.h \
788         $(NULL)
790 # these sources (also mentioned above) are generated.
791 BUILT_SOURCES +=                \
792         gconstructor_as_data.h  \
793         gioenumtypes.h          \
794         gioenumtypes.c          \
795         gdbus-daemon-generated.c \
796         gdbus-daemon-generated.h \
797         gnetworking.h           \
798         $(NULL)
800 EXTRA_DIST +=                   \
801         data-to-c.py            \
802         gioenumtypes.h.template \
803         gioenumtypes.c.template \
804         gio.rc.in               \
805         gschema.dtd             \
806         $(NULL)
808 BUILT_EXTRA_DIST +=             \
809         gio.rc
811 # This is read by gobject-introspection/misc/ and gtk-doc
812 gio-public-headers.txt: Makefile
813         $(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
815 CLEANFILES += gdbus-daemon-generated.c gdbus-daemon-generated.h gio-public-headers.txt gconstructor_as_data.h
818 DISTCLEANFILES +=               \
819         gioenumtypes.h          \
820         gioenumtypes.c
822 all-local: gio-public-headers.txt
824 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
825         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
826             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
828 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
829         $(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) > \
830             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
832 gio.def: libgio-2.0.la
833         $(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
835 gio-2.0.lib: libgio-2.0.la gio.def
836         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
838 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings gio-launch-desktop
840 glib_compile_resources_LDADD = libgio-2.0.la            \
841         $(top_builddir)/gobject/libgobject-2.0.la       \
842         $(top_builddir)/gmodule/libgmodule-2.0.la       \
843         $(top_builddir)/glib/libglib-2.0.la             \
844         $(NULL)
846 glib_compile_resources_SOURCES = \
847         gvdb/gvdb-format.h              \
848         gvdb/gvdb-builder.h             \
849         gvdb/gvdb-builder.c             \
850         glib-compile-resources.c
852 gio_querymodules_SOURCES = gio-querymodules.c giomodule-priv.c
853 gio_querymodules_LDADD   = libgio-2.0.la                \
854         $(top_builddir)/gobject/libgobject-2.0.la       \
855         $(top_builddir)/gmodule/libgmodule-2.0.la       \
856         $(top_builddir)/glib/libglib-2.0.la             \
857         $(NULL)
859 gio_launch_desktop_SOURCES = gio-launch-desktop.c
861 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
862         $(AM_V_GEN) $(PYTHON) $(srcdir)/data-to-c.py $(top_srcdir)/glib/gconstructor.h gconstructor_code $@
864 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
865 glib_compile_schemas_SOURCES = \
866         gvdb/gvdb-format.h              \
867         gvdb/gvdb-builder.h             \
868         gvdb/gvdb-builder.c             \
869         glib-compile-schemas.c
870 nodist_glib_compile_schemas_SOURCES = \
871         gconstructor_as_data.h \
872         $(NULL)
874 gsettings_LDADD = libgio-2.0.la                         \
875         $(top_builddir)/gobject/libgobject-2.0.la       \
876         $(top_builddir)/gmodule/libgmodule-2.0.la       \
877         $(top_builddir)/glib/libglib-2.0.la             \
878         $(NULL)
879 gsettings_SOURCES = gsettings-tool.c
881 schemadir = $(datadir)/glib-2.0/schemas
882 dist_schema_DATA = gschema.dtd
884 itsdir = $(datadir)/gettext/its
885 dist_its_DATA = gschema.loc gschema.its
887 # ------------------------------------------------------------------------
888 # SystemTap and dtrace
890 if ENABLE_DTRACE
891 gio_probes.h: gio_probes.d
892         $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
893         @$(SED) \
894                 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
895                 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
896                 < $@.tmp > $@ && rm -f $@.tmp
898 gio_probes.lo: gio_probes.d
899         $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
901 BUILT_SOURCES += gio_probes.h gio_probes.lo
902 CLEANFILES += gio_probes.h gio_probes.h.tmp
903 libgio_2_0_la_LIBADD += gio_probes.lo
904 endif
906 tapsetdir   = @ABS_TAPSET_DIR@
907 EXTRA_DIST += gio.stp.in
909 if ENABLE_SYSTEMTAP
910 tapset_DATA = libgio-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
911 CLEANFILES += $(tapset_DATA)
913 $(tapset_DATA): gio.stp.in Makefile
914         $(AM_V_GEN)$(SED) \
915                 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
916                 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
917                 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
918                 $< > $@
919 endif
921 # ------------------------------------------------------------------------
922 # gdbus(1) tool
924 bin_PROGRAMS += gdbus
925 gdbus_SOURCES = gdbus-tool.c
926 gdbus_LDADD = libgio-2.0.la                             \
927         $(top_builddir)/gobject/libgobject-2.0.la       \
928         $(top_builddir)/gmodule/libgmodule-2.0.la       \
929         $(top_builddir)/glib/libglib-2.0.la             \
930         $(NULL)
932 if OS_UNIX
933 if !OS_COCOA
934 # ------------------------------------------------------------------------
935 # gapplication(1) tool
936 bin_PROGRAMS += gapplication
937 gapplication_SOURCES = gapplication-tool.c
938 gapplication_LDADD = libgio-2.0.la                      \
939         $(top_builddir)/gobject/libgobject-2.0.la       \
940         $(top_builddir)/gmodule/libgmodule-2.0.la       \
941         $(top_builddir)/glib/libglib-2.0.la             \
942         $(NULL)
943 endif
944 endif
946 completiondir = $(datadir)/bash-completion/completions
947 completion_DATA = \
948         completion/gapplication                         \
949         completion/gdbus                                \
950         completion/gio                                  \
951         completion/gsettings                            \
952         completion/gresource
953 EXTRA_DIST += $(completion_DATA)
955 # ------------------------------------------------------------------------
956 # gresource tool
958 bin_PROGRAMS += gresource
959 gresource_SOURCES = gresource-tool.c
960 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
961 gresource_LDADD = libgio-2.0.la                         \
962         $(top_builddir)/gobject/libgobject-2.0.la       \
963         $(top_builddir)/gmodule/libgmodule-2.0.la       \
964         $(top_builddir)/glib/libglib-2.0.la             \
965         $(LIBELF_LIBS)
967 # ------------------------------------------------------------------------
968 # gio tool
970 bin_PROGRAMS += gio
971 gio_SOURCES = \
972         gio-tool.c                                      \
973         gio-tool.h                                      \
974         gio-tool-cat.c                                  \
975         gio-tool-copy.c                                 \
976         gio-tool-info.c                                 \
977         gio-tool-list.c                                 \
978         gio-tool-mime.c                                 \
979         gio-tool-mkdir.c                                \
980         gio-tool-monitor.c                              \
981         gio-tool-mount.c                                \
982         gio-tool-move.c                                 \
983         gio-tool-open.c                                 \
984         gio-tool-rename.c                               \
985         gio-tool-remove.c                               \
986         gio-tool-save.c                                 \
987         gio-tool-set.c                                  \
988         gio-tool-trash.c                                \
989         gio-tool-tree.c                                 \
990         $(NULL)
991 gio_LDADD = libgio-2.0.la                               \
992         $(top_builddir)/gobject/libgobject-2.0.la       \
993         $(top_builddir)/glib/libglib-2.0.la             \
994         $(NULL)
996 dist-hook: $(BUILT_EXTRA_DIST)
997         files='$(BUILT_EXTRA_DIST)'; \
998         for f in $$files; do \
999           if test -f $$f; then d=.; else d=$(srcdir); fi; \
1000           cp $$d/$$f $(distdir) || exit 1; done
1002 if HAVE_GLIB_RUNTIME_LIBDIR
1003 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
1004 else
1005 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
1006 endif
1008 if HAVE_GLIB_RUNTIME_LIBDIR
1009 install-data-hook:
1010         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
1011         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
1012         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
1013         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
1014         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
1015 endif