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