Link with Foundation framework on OSX.
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 SUBDIRS = gdbus-2.0/codegen
6
7 if OS_UNIX
8 SUBDIRS += xdgmime
9 endif
10
11 if OS_WIN32_AND_DLL_COMPILATION
12 if MS_LIB_AVAILABLE
13 noinst_DATA = gio-2.0.lib
14
15 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
16 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
17 endif
18 endif
19
20 install-ms-lib:
21         $(install_ms_lib_cmd)
22
23 uninstall-ms-lib:
24         $(uninstall_ms_lib_cmd)
25
26 gio.def: gio.symbols
27         $(AM_V_GEN) (echo EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/        /' -e 's/G_GNUC_[^ ]*//g' | sort) > $(builddir)/gio.def.tmp && \
28           mv $(builddir)/gio.def.tmp $(builddir)/gio.def
29
30 if OS_LINUX
31 if HAVE_GNUC_VISIBILITY
32 TESTS = abicheck.sh
33 endif
34 endif
35
36 AM_CPPFLAGS = \
37         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
38         $(gmodule_INCLUDES)                             \
39         $(GLIB_DEBUG_FLAGS)                             \
40         -DGIO_COMPILATION                               \
41         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
42
43 lib_LTLIBRARIES = libgio-2.0.la
44
45 gdbus_headers =                         \
46         gdbusauthobserver.h             \
47         gcredentials.h                  \
48         gdbusutils.h                    \
49         gdbuserror.h                    \
50         gdbusaddress.h                  \
51         gdbusconnection.h               \
52         gdbusmessage.h                  \
53         gdbusnameowning.h               \
54         gdbusnamewatching.h             \
55         gdbusproxy.h                    \
56         gdbusintrospection.h            \
57         gdbusmethodinvocation.h         \
58         gdbusserver.h                   \
59         gdbusinterface.h                \
60         gdbusinterfaceskeleton.h        \
61         gdbusobject.h                   \
62         gdbusobjectskeleton.h           \
63         gdbusobjectproxy.h              \
64         gdbusobjectmanager.h            \
65         gdbusobjectmanagerclient.h      \
66         gdbusobjectmanagerserver.h      \
67         $(NULL)
68
69 gdbus_sources =                                                         \
70         gdbusutils.h                    gdbusutils.c                    \
71         gdbusaddress.h                  gdbusaddress.c                  \
72         gdbusauthobserver.h             gdbusauthobserver.c             \
73         gdbusauth.h                     gdbusauth.c                     \
74         gdbusauthmechanism.h            gdbusauthmechanism.c            \
75         gdbusauthmechanismanon.h        gdbusauthmechanismanon.c        \
76         gdbusauthmechanismexternal.h    gdbusauthmechanismexternal.c    \
77         gdbusauthmechanismsha1.h        gdbusauthmechanismsha1.c        \
78         gdbuserror.h                    gdbuserror.c                    \
79         gdbusconnection.h               gdbusconnection.c               \
80         gdbusmessage.h                  gdbusmessage.c                  \
81         gdbusnameowning.h               gdbusnameowning.c               \
82         gdbusnamewatching.h             gdbusnamewatching.c             \
83         gdbusproxy.h                    gdbusproxy.c                    \
84         gdbusprivate.h                  gdbusprivate.c                  \
85         gdbusintrospection.h            gdbusintrospection.c            \
86         gdbusmethodinvocation.h         gdbusmethodinvocation.c         \
87         gdbusserver.h                   gdbusserver.c                   \
88         gdbusinterface.h                gdbusinterface.c                \
89         gdbusinterfaceskeleton.h        gdbusinterfaceskeleton.c        \
90         gdbusobject.h                   gdbusobject.c                   \
91         gdbusobjectskeleton.h           gdbusobjectskeleton.c           \
92         gdbusobjectproxy.h              gdbusobjectproxy.c              \
93         gdbusobjectmanager.h            gdbusobjectmanager.c            \
94         gdbusobjectmanagerclient.h      gdbusobjectmanagerclient.c      \
95         gdbusobjectmanagerserver.h      gdbusobjectmanagerserver.c      \
96         $(NULL)
97
98 settings_headers = \
99         gsettingsbackend.h              \
100         gsettingsschema.h               \
101         gsettings.h
102
103 settings_sources = \
104         gvdb/gvdb-format.h              \
105         gvdb/gvdb-reader.h              \
106         gvdb/gvdb-reader.c              \
107         gdelayedsettingsbackend.h       \
108         gdelayedsettingsbackend.c       \
109         gkeyfilesettingsbackend.c       \
110         gmemorysettingsbackend.c        \
111         gnullsettingsbackend.c          \
112         gsettingsbackendinternal.h      \
113         gsettingsbackend.c              \
114         gsettingsschema.h               \
115         gsettingsschema-internal.h      \
116         gsettingsschema.c               \
117         gsettings-mapping.h             \
118         gsettings-mapping.c             \
119         gsettings.c
120
121 if OS_WIN32
122 settings_sources += \
123         gregistrysettingsbackend.h      \
124         gregistrysettingsbackend.c
125 endif
126
127 if OS_CARBON
128 AM_CPPFLAGS += -DG_OS_CARBON
129
130 settings_sources += \
131         gnextstepsettingsbackend.c
132 endif
133
134 application_headers = \
135         gapplication.h                  \
136         gapplicationcommandline.h       \
137                                         \
138         gactiongroup.h                  \
139         gactionmap.h                    \
140         gsimpleactiongroup.h            \
141         gremoteactiongroup.h            \
142         gactiongroupexporter.h          \
143         gdbusactiongroup.h              \
144         gaction.h                       \
145         gsimpleaction.h                 \
146                                         \
147         gmenumodel.h                    \
148         gmenu.h                         \
149         gmenuexporter.h                 \
150         gdbusmenumodel.h                \
151         $(NULL)
152
153 application_sources = \
154         gapplication.c                          \
155         gapplicationcommandline.c               \
156         gapplicationimpl-dbus.c                 \
157         gapplicationimpl.h                      \
158                                                 \
159         gactiongroup.c                          \
160         gactionmap.c                            \
161         gsimpleactiongroup.c                    \
162         gremoteactiongroup.c                    \
163         gactiongroupexporter.c                  \
164         gdbusactiongroup.c                      \
165         gaction.c                               \
166         gsimpleaction.c                         \
167                                                 \
168         gmenumodel.c                            \
169         gmenu.c                                 \
170         gmenuexporter.c                         \
171         gdbusmenumodel.c                        \
172         $(NULL)
173
174 local_sources = \
175         glocaldirectorymonitor.c        \
176         glocaldirectorymonitor.h        \
177         glocalfile.c                    \
178         glocalfile.h                    \
179         glocalfileenumerator.c          \
180         glocalfileenumerator.h          \
181         glocalfileinfo.c                \
182         glocalfileinfo.h                \
183         glocalfileinputstream.c         \
184         glocalfileinputstream.h         \
185         glocalfilemonitor.c             \
186         glocalfilemonitor.h             \
187         glocalfileoutputstream.c        \
188         glocalfileoutputstream.h        \
189         glocalfileiostream.c            \
190         glocalfileiostream.h            \
191         glocalvfs.c                     \
192         glocalvfs.h                     \
193         gsocks4proxy.c                  \
194         gsocks4proxy.h                  \
195         gsocks4aproxy.c                 \
196         gsocks4aproxy.h                 \
197         gsocks5proxy.c                  \
198         gsocks5proxy.h                  \
199         $(NULL)
200
201 platform_libadd =
202 platform_deps =
203 appinfo_sources =
204
205 if HAVE_INOTIFY
206 SUBDIRS += inotify
207 platform_libadd += inotify/libinotify.la
208 platform_deps += inotify/libinotify.la
209 endif
210
211 if HAVE_FEN
212 AM_CPPFLAGS += -DHAVE_FEN
213 SUBDIRS += fen
214 platform_libadd += fen/libfen.la
215 platform_deps += fen/libfen.la
216 endif
217
218 if OS_WIN32
219 SUBDIRS += win32
220 platform_libadd += win32/libgiowin32.la
221 platform_deps += win32/libgiowin32.la
222 endif
223
224 SUBDIRS += .
225
226 if HAVE_FAM
227 SUBDIRS += fam
228 endif
229
230 if OS_UNIX
231 appinfo_sources += gdesktopappinfo.c
232 platform_libadd += xdgmime/libxdgmime.la $(RESOLVER_LIBADD)
233 platform_deps += xdgmime/libxdgmime.la
234 unix_sources = \
235         gfiledescriptorbased.c  \
236         gunixconnection.c       \
237         gunixcredentialsmessage.c       \
238         gunixfdlist.c           \
239         gunixfdmessage.c        \
240         gunixmount.c            \
241         gunixmount.h            \
242         gunixmounts.c           \
243         gunixsocketaddress.c    \
244         gunixvolume.c           \
245         gunixvolume.h           \
246         gunixvolumemonitor.c    \
247         gunixvolumemonitor.h    \
248         gunixinputstream.c      \
249         gunixoutputstream.c     \
250         $(NULL)
251
252
253 giounixincludedir=$(includedir)/gio-unix-2.0/gio
254 giounixinclude_HEADERS = \
255         gdesktopappinfo.h       \
256         gfiledescriptorbased.h  \
257         gunixconnection.h       \
258         gunixcredentialsmessage.h       \
259         gunixmounts.h           \
260         gunixfdlist.h           \
261         gunixfdmessage.h        \
262         gunixinputstream.h      \
263         gunixoutputstream.h     \
264         gunixsocketaddress.h    \
265         $(NULL)
266
267 if HAVE_NETLINK
268 unix_sources +=                  \
269         gnetworkmonitornetlink.c \
270         gnetworkmonitornetlink.h \
271         $(NULL)
272 endif
273 endif
274
275 win32_actual_sources = \
276         gwin32mount.c \
277         gwin32mount.h \
278         gwin32volumemonitor.c \
279         gwin32volumemonitor.h \
280         gwin32inputstream.c \
281         gwin32outputstream.c \
282         gwin32outputstream.h \
283         $(NULL)
284
285 win32_more_sources_for_vcproj = \
286         gwin32appinfo.c \
287         gregistrysettingsbackend.c \
288         win32/gwin32directorymonitor.c \
289         win32/gwinhttpfile.c \
290         win32/gwinhttpfileinputstream.c \
291         win32/gwinhttpfileoutputstream.c \
292         win32/gwinhttpvfs.c
293
294 if OS_WIN32
295 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
296 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
297 win32_sources = $(win32_actual_sources)
298
299 giowin32includedir=$(includedir)/gio-win32-2.0/gio
300 giowin32include_HEADERS = \
301         gwin32inputstream.h \
302         gwin32outputstream.h \
303         $(NULL)
304
305 endif
306
307 SUBDIRS += tests
308
309 libgio_2_0_la_SOURCES =         \
310         gappinfo.c              \
311         gasynchelper.c          \
312         gasynchelper.h          \
313         gasyncinitable.c        \
314         gasyncresult.c          \
315         gbufferedinputstream.c  \
316         gbufferedoutputstream.c \
317         gcancellable.c          \
318         gcontenttype.c          \
319         gcontenttypeprivate.h   \
320         gcharsetconverter.c     \
321         gconverter.c            \
322         gconverterinputstream.c \
323         gconverteroutputstream.c        \
324         gcredentials.c          \
325         gdatainputstream.c      \
326         gdataoutputstream.c     \
327         gdrive.c                \
328         gdummyfile.h            \
329         gdummyfile.c            \
330         gdummyproxyresolver.c   \
331         gdummyproxyresolver.h   \
332         gdummytlsbackend.c      \
333         gdummytlsbackend.h      \
334         gemblem.h               \
335         gemblem.c               \
336         gemblemedicon.h         \
337         gemblemedicon.c         \
338         gfile.c                 \
339         gfileattribute.c        \
340         gfileattribute-priv.h   \
341         gfileenumerator.c       \
342         gfileicon.c             \
343         gfileinfo.c             \
344         gfileinfo-priv.h        \
345         gfileinputstream.c      \
346         gfilemonitor.c          \
347         gfilenamecompleter.c    \
348         gfileoutputstream.c     \
349         gfileiostream.c         \
350         gfilterinputstream.c    \
351         gfilteroutputstream.c   \
352         gicon.c                 \
353         ginetaddress.c          \
354         ginetaddressmask.c      \
355         ginetsocketaddress.c    \
356         ginitable.c             \
357         ginputstream.c          \
358         gioenums.h              \
359         gioerror.c              \
360         giomodule.c             \
361         giomodule-priv.h        \
362         gioscheduler.c          \
363         giostream.c             \
364         gloadableicon.c         \
365         gmount.c                \
366         gmemoryinputstream.c    \
367         gmemoryoutputstream.c   \
368         gmountoperation.c       \
369         gnativevolumemonitor.c  \
370         gnativevolumemonitor.h  \
371         gnetworkaddress.c       \
372         gnetworkingprivate.h    \
373         gnetworkmonitor.c       \
374         gnetworkmonitorbase.c   \
375         gnetworkmonitorbase.h   \
376         gnetworkservice.c       \
377         goutputstream.c         \
378         gpermission.c           \
379         gpollableinputstream.c  \
380         gpollableoutputstream.c \
381         gpollfilemonitor.c      \
382         gpollfilemonitor.h      \
383         gproxyresolver.c        \
384         gresolver.c             \
385         gresource.c             \
386         gresourcefile.c         \
387         gresourcefile.h         \
388         gseekable.c             \
389         gsimpleasyncresult.c    \
390         gsimplepermission.c     \
391         gsocket.c               \
392         gsocketaddress.c        \
393         gsocketaddressenumerator.c \
394         gsocketclient.c         \
395         gsocketconnectable.c    \
396         gsocketconnection.c     \
397         gsocketcontrolmessage.c \
398         gsocketinputstream.c    \
399         gsocketinputstream.h    \
400         gsocketlistener.c       \
401         gsocketoutputstream.c   \
402         gsocketoutputstream.h   \
403         gproxy.c                \
404         gproxyaddress.c         \
405         gproxyaddressenumerator.c \
406         gsocketservice.c        \
407         gsrvtarget.c            \
408         gtcpconnection.c        \
409         gtcpwrapperconnection.c \
410         gthreadedsocketservice.c\
411         gthemedicon.c           \
412         gthreadedresolver.c     \
413         gthreadedresolver.h     \
414         gtlsbackend.c           \
415         gtlscertificate.c       \
416         gtlsclientconnection.c  \
417         gtlsconnection.c        \
418         gtlsdatabase.c          \
419         gtlsfiledatabase.c      \
420         gtlsinteraction.c       \
421         gtlspassword.c          \
422         gtlsserverconnection.c  \
423         gunionvolumemonitor.c   \
424         gunionvolumemonitor.h   \
425         gvfs.c                  \
426         gvolume.c               \
427         gvolumemonitor.c        \
428         gzlibcompressor.c       \
429         gzlibdecompressor.c     \
430         gmountprivate.h         \
431         gioenumtypes.h          \
432         gioenumtypes.c          \
433         $(appinfo_sources)      \
434         $(unix_sources)         \
435         $(win32_sources)        \
436         $(application_sources)  \
437         $(settings_sources)     \
438         $(gdbus_sources)        \
439         $(local_sources)        \
440         $(NULL)
441
442 EXTRA_DIST += strinfo.c
443
444 libgio_2_0_la_LIBADD = \
445         $(top_builddir)/glib/libglib-2.0.la             \
446         $(top_builddir)/gobject/libgobject-2.0.la       \
447         $(top_builddir)/gmodule/libgmodule-2.0.la       \
448         $(platform_libadd)                              \
449         $(ZLIB_LIBS)                                    \
450         $(SELINUX_LIBS)                                 \
451         $(GLIB_LIBS)                                    \
452         $(XATTR_LIBS)                                   \
453         $(NETWORK_LIBS)                                 \
454         $(NULL)
455
456 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
457
458 if PLATFORM_WIN32
459 no_undefined = -no-undefined
460 endif
461
462 if OS_WIN32_AND_DLL_COMPILATION
463 export_symbols = -export-symbols $(builddir)/gio.def
464 gio_def = gio.def
465
466 gio_win32_res = gio-win32-res.o
467 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
468
469 install-def-file:
470         $(INSTALL) $(builddir)/gio.def $(DESTDIR)$(libdir)/gio-2.0.def
471
472 uninstall-def-file:
473         -rm $(DESTDIR)$(libdir)/gio-2.0.def
474 else
475 install-def-file:
476 uninstall-def-file:
477
478 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
479 endif
480
481 install-data-local: install-ms-lib install-def-file
482         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
483
484 uninstall-local: uninstall-ms-lib uninstall-def-file
485
486 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
487         $(gio_win32_res_ldflag) \
488         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
489         -export-dynamic $(no_undefined) $(export_symbols)
490
491 # This condition is misnamed.  It's really checking for Cocoa, not Carbon
492 if OS_CARBON
493 # This is dumb.  The ObjC source file should be properly named .m
494 libgio_2_0_la_CFLAGS = -xobjective-c
495 libgio_2_0_la_LDFLAGS += -framework Foundation
496 endif
497
498 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
499
500 gio-win32-res.o: gio.rc
501         $(WINDRES) gio.rc $@
502
503 gio_headers =                   \
504         gappinfo.h              \
505         gasyncinitable.h        \
506         gasyncresult.h          \
507         gbufferedinputstream.h  \
508         gbufferedoutputstream.h \
509         gcancellable.h          \
510         gcontenttype.h          \
511         gcharsetconverter.h     \
512         gconverter.h            \
513         gconverterinputstream.h \
514         gconverteroutputstream.h        \
515         gdatainputstream.h      \
516         gdataoutputstream.h     \
517         gdrive.h                \
518         gemblem.h               \
519         gemblemedicon.h         \
520         gfile.h                 \
521         gfileattribute.h        \
522         gfileenumerator.h       \
523         gfileicon.h             \
524         gfileinfo.h             \
525         gfileinputstream.h      \
526         gfilemonitor.h          \
527         gfilenamecompleter.h    \
528         gfileoutputstream.h     \
529         gfileiostream.h         \
530         gfilterinputstream.h    \
531         gfilteroutputstream.h   \
532         gicon.h                 \
533         ginetaddress.h          \
534         ginetaddressmask.h      \
535         ginetsocketaddress.h    \
536         ginputstream.h          \
537         ginitable.h             \
538         gio.h                   \
539         giotypes.h              \
540         gioenums.h              \
541         gioerror.h              \
542         giomodule.h             \
543         gioscheduler.h          \
544         giostream.h             \
545         gloadableicon.h         \
546         gmount.h                \
547         gmemoryinputstream.h    \
548         gmemoryoutputstream.h   \
549         gmountoperation.h       \
550         gnativevolumemonitor.h  \
551         gnetworkaddress.h       \
552         gnetworkmonitor.h       \
553         gnetworkservice.h       \
554         goutputstream.h         \
555         gpermission.h           \
556         gpollableinputstream.h  \
557         gpollableoutputstream.h \
558         gproxyaddress.h         \
559         gproxy.h                \
560         gproxyaddressenumerator.h \
561         gproxyresolver.h        \
562         gresolver.h             \
563         gresource.h             \
564         gseekable.h             \
565         gsimpleasyncresult.h    \
566         gsimplepermission.h     \
567         gsocket.h               \
568         gsocketaddress.h        \
569         gsocketaddressenumerator.h \
570         gsocketclient.h         \
571         gsocketconnectable.h    \
572         gsocketconnection.h     \
573         gsocketcontrolmessage.h \
574         gsocketlistener.h       \
575         gsocketservice.h        \
576         gsrvtarget.h            \
577         gtcpconnection.h        \
578         gtcpwrapperconnection.h \
579         gthreadedsocketservice.h\
580         gthemedicon.h           \
581         gtlsbackend.h           \
582         gtlscertificate.h       \
583         gtlsclientconnection.h  \
584         gtlsconnection.h        \
585         gtlsdatabase.h          \
586         gtlsfiledatabase.h      \
587         gtlsinteraction.h       \
588         gtlspassword.h          \
589         gtlsserverconnection.h  \
590         gvfs.h                  \
591         gvolume.h               \
592         gvolumemonitor.h        \
593         gzlibcompressor.h       \
594         gzlibdecompressor.h     \
595         $(application_headers)  \
596         $(settings_headers)     \
597         $(gdbus_headers)        \
598         $(NULL)
599
600 gioincludedir=$(includedir)/glib-2.0/gio/
601 gioinclude_HEADERS =            \
602         $(gio_headers)          \
603         gioenumtypes.h
604
605 # these sources (also mentioned above) are generated.
606 BUILT_SOURCES =                 \
607         gconstructor_as_data.h  \
608         gioenumtypes.h          \
609         gioenumtypes.c          \
610         $(NULL)
611
612 EXTRA_DIST +=                   \
613         data-to-c.pl            \
614         gio.symbols             \
615         gioenumtypes.h.template \
616         gioenumtypes.c.template \
617         makefile.msc            \
618         abicheck.sh             \
619         gio.rc.in               \
620         gschema.dtd             \
621         gconstructor_as_data.h  \
622         $(NULL)
623
624 BUILT_EXTRA_DIST =              \
625         gio.rc
626
627 # This is read by gobject-introspection/misc/ and gtk-doc
628 gio-public-headers.txt: Makefile
629         echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
630
631 CLEANFILES = gio-public-headers.txt gconstructor_as_data.h
632
633 all-local: gio-public-headers.txt
634
635 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
636         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
637           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
638             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
639
640 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
641         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
642           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
643             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
644
645 gio-2.0.lib: libgio-2.0.la gio.def
646         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
647
648 bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
649
650 glib_compile_resources_LDADD = \
651         $(top_builddir)/glib/libglib-2.0.la \
652         $(top_builddir)/gobject/libgobject-2.0.la       \
653         libgio-2.0.la
654
655 glib_compile_resources_SOURCES = \
656         gvdb/gvdb-format.h              \
657         gvdb/gvdb-builder.h             \
658         gvdb/gvdb-builder.c             \
659         glib-compile-resources.c
660
661 gio_querymodules_SOURCES = gio-querymodules.c
662 gio_querymodules_LDADD   = \
663         $(top_builddir)/glib/libglib-2.0.la             \
664         $(top_builddir)/gobject/libgobject-2.0.la       \
665         $(top_builddir)/gmodule/libgmodule-2.0.la       \
666         libgio-2.0.la                                   \
667         $(NULL)
668
669 gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
670         $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
671
672 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
673 glib_compile_schemas_SOURCES = \
674         gconstructor_as_data.h \
675         gvdb/gvdb-format.h              \
676         gvdb/gvdb-builder.h             \
677         gvdb/gvdb-builder.c             \
678         glib-compile-schemas.c
679
680 gsettings_LDADD = \
681         $(top_builddir)/glib/libglib-2.0.la             \
682         $(top_builddir)/gobject/libgobject-2.0.la       \
683         libgio-2.0.la
684 gsettings_SOURCES = gsettings-tool.c
685
686 schemadir = $(datadir)/glib-2.0/schemas
687 dist_schema_DATA = gschema.dtd
688
689 # ------------------------------------------------------------------------
690 # gdbus(1) tool
691
692 bin_PROGRAMS += gdbus
693 gdbus_SOURCES = gdbus-tool.c
694 gdbus_LDADD = libgio-2.0.la \
695         $(top_builddir)/glib/libglib-2.0.la             \
696         $(top_builddir)/gobject/libgobject-2.0.la
697
698 completiondir = $(sysconfdir)/bash_completion.d
699 completion_DATA = \
700         gdbus-bash-completion.sh                \
701         gsettings-bash-completion.sh            \
702         gresource-bash-completion.sh
703 EXTRA_DIST += $(completion_DATA)
704
705 # ------------------------------------------------------------------------
706 # gresource tool
707
708 bin_PROGRAMS += gresource
709 gresource_SOURCES = gresource-tool.c
710 gresource_CPPFLAGS = $(LIBELF_CFLAGS) $(AM_CPPFLAGS)
711 gresource_LDADD = libgio-2.0.la \
712         $(top_builddir)/glib/libglib-2.0.la             \
713         $(top_builddir)/gobject/libgobject-2.0.la \
714         $(LIBELF_LIBS)
715
716 # ------------------------------------------------------------------------
717
718 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj ../build/win32/vs10/gio.vcxproj ../build/win32/vs10/gio.vcxproj.filters
719         files='$(BUILT_EXTRA_DIST)'; \
720         for f in $$files; do \
721           if test -f $$f; then d=.; else d=$(srcdir); fi; \
722           cp $$d/$$f $(distdir) || exit 1; done
723
724 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
725         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
726                 case $$F in \
727                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
728                 *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
729                      ;; \
730                 esac; \
731         done | sort -u >libgio.sourcefiles
732         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
733         rm libgio.sourcefiles
734
735 ../build/win32/vs10/gio.vcxproj: $(top_srcdir)/build/win32/vs10/gio.vcxprojin
736         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
737                 case $$F in \
738                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
739                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'" />' \
740                      ;; \
741                 esac; \
742         done | sort -u >libgio.vs10.sourcefiles
743         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxprojin >$@
744         rm libgio.vs10.sourcefiles
745
746 ../build/win32/vs10/gio.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin
747         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_more_sources_for_vcproj) | tr '/' '\\'`; do \
748                 case $$F in \
749                 gunix*.c|gdesktopappinfo.c|gnetworkmonitornetlink.c) ;; \
750                 *.c) echo '    <ClCompile Include="..\..\..\gio\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
751                      ;; \
752                 esac; \
753         done | sort -u >libgio.vs10.sourcefiles.filters
754         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gio.vcxproj.filtersin >$@
755         rm libgio.vs10.sourcefiles.filters
756
757 if HAVE_GLIB_RUNTIME_LIBDIR
758 install-data-hook:
759         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
760         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
761         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
762         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
763         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
764 endif