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