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