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