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