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