Add some tests
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 SUBDIRS=tests
6
7 if OS_UNIX
8 SUBDIRS += xdgmime
9 endif
10
11 gio.def: gio.symbols
12         (echo -e 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) > gio.def.tmp && \
13           mv gio.def.tmp gio.def
14
15 gioalias.h: gio.symbols
16         $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \
17           mv gioalias.h.tmp gioalias.h
18
19 gioaliasdef.c: gio.symbols
20         $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \
21           mv gioaliasdef.c.tmp gioaliasdef.c
22
23 if OS_LINUX
24 if HAVE_GNUC_VISIBILITY
25 TESTS = abicheck.sh pltcheck.sh
26 endif
27 endif
28
29 AM_CPPFLAGS = \
30         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
31         -I$(top_builddir)                               \
32         -I$(top_srcdir)                                 \
33         -I$(top_srcdir)/glib                            \
34         -I$(top_srcdir)/gmodule                         \
35         $(GLIB_DEBUG_FLAGS)                             \
36         -DG_DISABLE_DEPRECATED                          \
37         -DGIO_COMPILATION                               \
38         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
39
40 lib_LTLIBRARIES = libgio-2.0.la
41
42 marshal_sources = \
43         gio-marshal.h   \
44         gio-marshal.c   \
45         $(NULL)
46
47 if CROSS_COMPILING
48   glib_genmarshal=$(GLIB_GENMARSHAL)
49 else
50   glib_genmarshal=../gobject/glib-genmarshal
51 endif
52
53 gio-marshal.h: gio-marshal.list
54         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header > $@.tmp && \
55           mv $@.tmp $@
56
57 gio-marshal.c: gio-marshal.h gio-marshal.list
58         (echo "#include \"gio-marshal.h\""; \
59         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body) > $@.tmp && \
60           mv $@.tmp $@
61
62 local_sources = \
63         glocaldirectorymonitor.c        \
64         glocaldirectorymonitor.h        \
65         glocalfile.c                    \
66         glocalfile.h                    \
67         glocalfileenumerator.c          \
68         glocalfileenumerator.h          \
69         glocalfileinfo.c                \
70         glocalfileinfo.h                \
71         glocalfileinputstream.c         \
72         glocalfileinputstream.h         \
73         glocalfilemonitor.c             \
74         glocalfilemonitor.h             \
75         glocalfileoutputstream.c        \
76         glocalfileoutputstream.h        \
77         glocalvfs.c                     \
78         glocalvfs.h                     \
79         $(NULL)
80
81 platform_libadd =
82 appinfo_sources =
83
84 if HAVE_INOTIFY
85 SUBDIRS += inotify
86 platform_libadd += inotify/libinotify.la
87 endif
88
89 SUBDIRS += .
90
91 if HAVE_FAM
92 SUBDIRS += fam
93 endif
94
95 if OS_UNIX
96 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
97 platform_libadd += xdgmime/libxdgmime.la
98 unix_sources = \
99         gunixmount.c            \
100         gunixmount.h            \
101         gunixmounts.c           \
102         gunixmounts.h           \
103         gunixvolume.c           \
104         gunixvolume.h           \
105         gunixvolumemonitor.c    \
106         gunixvolumemonitor.h    \
107         gunixinputstream.c      \
108         gunixoutputstream.c     \
109         $(NULL)
110
111
112 giounixincludedir=$(includedir)/gio-unix-2.0/gio
113 giounixinclude_HEADERS = \
114         gdesktopappinfo.h       \
115         gunixmounts.h           \
116         gunixinputstream.h      \
117         gunixoutputstream.h     \
118         $(NULL)
119 endif
120
121 if OS_WIN32
122 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
123 platform_libadd += -lshlwapi
124 endif
125
126 libgio_2_0_la_SOURCES =         \
127         gappinfo.c              \
128         gasynchelper.c          \
129         gasynchelper.h          \
130         gasyncresult.c          \
131         gbufferedinputstream.c  \
132         gbufferedoutputstream.c \
133         gcancellable.c          \
134         gcontenttype.c          \
135         gcontenttypeprivate.h   \
136         gdatainputstream.c      \
137         gdataoutputstream.c     \
138         gdirectorymonitor.c     \
139         gdrive.c                \
140         gdummyfile.h            \
141         gdummyfile.c            \
142         gfile.c                 \
143         gfileattribute.c        \
144         gfileattribute-priv.h   \
145         gfileenumerator.c       \
146         gfileicon.c             \
147         gfileinfo.c             \
148         gfileinputstream.c      \
149         gfilemonitor.c          \
150         gfilenamecompleter.c    \
151         gfileoutputstream.c     \
152         gfilterinputstream.c    \
153         gfilteroutputstream.c   \
154         gicon.c                 \
155         ginputstream.c          \
156         gioerror.c              \
157         giomodule.c             \
158         giomodule-priv.h        \
159         gioscheduler.c          \
160         gloadableicon.c         \
161         gmount.c                \
162         gmemoryinputstream.c    \
163         gmemoryoutputstream.c   \
164         gmountoperation.c       \
165         gnativevolumemonitor.c  \
166         gnativevolumemonitor.h  \
167         goutputstream.c         \
168         gpollfilemonitor.c      \
169         gpollfilemonitor.h      \
170         gseekable.c             \
171         gsimpleasyncresult.c    \
172         gthemedicon.c           \
173         gunionvolumemonitor.c   \
174         gunionvolumemonitor.h   \
175         gvfs.c                  \
176         gvolume.c               \
177         gvolumemonitor.c        \
178         gmountprivate.h         \
179         gioenumtypes.h          \
180         gioenumtypes.c          \
181         gioalias.h              \
182         gioaliasdef.c           \
183         $(appinfo_sources)      \
184         $(unix_sources)         \
185         $(local_sources)        \
186         $(marshal_sources)      \
187         $(NULL)
188
189 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
190
191 libgio_2_0_la_LIBADD = \
192         $(top_builddir)/glib/libglib-2.0.la             \
193         $(top_builddir)/gobject/libgobject-2.0.la       \
194         $(top_builddir)/gmodule/libgmodule-2.0.la       \
195         $(platform_libadd)                              \
196         $(SELINUX_LIBS)                                 \
197         $(GLIB_LIBS)                                    \
198         $(XATTR_LIBS)                                   \
199         $(NULL)
200
201 if OS_WIN32
202 no_undefined = -no-undefined
203 endif
204
205 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
206
207 gio_headers =                   \
208         gappinfo.h              \
209         gasyncresult.h          \
210         gbufferedinputstream.h  \
211         gbufferedoutputstream.h \
212         gcancellable.h          \
213         gcontenttype.h          \
214         gdatainputstream.h      \
215         gdataoutputstream.h     \
216         gdirectorymonitor.h     \
217         gdrive.h                \
218         gfile.h                 \
219         gfileattribute.h        \
220         gfileenumerator.h       \
221         gfileicon.h             \
222         gfileinfo.h             \
223         gfileinputstream.h      \
224         gfilemonitor.h          \
225         gfilenamecompleter.h    \
226         gfileoutputstream.h     \
227         gfilterinputstream.h    \
228         gfilteroutputstream.h   \
229         gicon.h                 \
230         ginputstream.h          \
231         gio.h                   \
232         gioenumtypes.h          \
233         gioerror.h              \
234         giomodule.h             \
235         gioscheduler.h          \
236         gloadableicon.h         \
237         gmount.h                \
238         gmemoryinputstream.h    \
239         gmemoryoutputstream.h   \
240         gmountoperation.h       \
241         gnativevolumemonitor.h  \
242         goutputstream.h         \
243         gseekable.h             \
244         gsimpleasyncresult.h    \
245         gthemedicon.h           \
246         gvfs.h                  \
247         gvolume.h               \
248         gvolumemonitor.h        \
249         $(NULL)
250
251 gioincludedir=$(includedir)/glib-2.0/gio/
252 gioinclude_HEADERS =            \
253         $(gio_headers)          \
254         gioenumtypes.h
255
256 # these sources (also mentioned above) are generated.
257 BUILT_SOURCES =                 \
258         gio-marshal.h           \
259         gio-marshal.c           \
260         gioalias.h              \
261         gioaliasdef.c           \
262         gioenumtypes.h          \
263         gioenumtypes.c          \
264         $(NULL)
265
266 EXTRA_DIST +=                   \
267         gio-marshal.list        \
268         gio.symbols             \
269         gioenumtypes.h.template \
270         gioenumtypes.c.template \
271         makegioalias.pl         \
272         abicheck.sh             \
273         pltcheck.sh             \
274         $(NULL)
275
276 CLEANFILES =                    \
277         $(marshal_sources)      \
278         $(NULL)
279
280 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
281         ( top_builddir=`cd $(top_builddir) && pwd`; \
282           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
283             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
284
285 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
286         ( top_builddir=`cd $(top_builddir) && pwd`; \
287           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
288             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c