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