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