Pass --internal to glib-genmarshal
[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.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 --internal > $@.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 --internal) > $@.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 SUBDIRS += tests
127
128 libgio_2_0_la_SOURCES =         \
129         gappinfo.c              \
130         gasynchelper.c          \
131         gasynchelper.h          \
132         gasyncresult.c          \
133         gbufferedinputstream.c  \
134         gbufferedoutputstream.c \
135         gcancellable.c          \
136         gcontenttype.c          \
137         gcontenttypeprivate.h   \
138         gdatainputstream.c      \
139         gdataoutputstream.c     \
140         gdrive.c                \
141         gdummyfile.h            \
142         gdummyfile.c            \
143         gfile.c                 \
144         gfileattribute.c        \
145         gfileattribute-priv.h   \
146         gfileenumerator.c       \
147         gfileicon.c             \
148         gfileinfo.c             \
149         gfileinputstream.c      \
150         gfilemonitor.c          \
151         gfilenamecompleter.c    \
152         gfileoutputstream.c     \
153         gfilterinputstream.c    \
154         gfilteroutputstream.c   \
155         gicon.c                 \
156         ginputstream.c          \
157         gioerror.c              \
158         giomodule.c             \
159         giomodule-priv.h        \
160         gioscheduler.c          \
161         gloadableicon.c         \
162         gmount.c                \
163         gmemoryinputstream.c    \
164         gmemoryoutputstream.c   \
165         gmountoperation.c       \
166         gnativevolumemonitor.c  \
167         gnativevolumemonitor.h  \
168         goutputstream.c         \
169         gpollfilemonitor.c      \
170         gpollfilemonitor.h      \
171         gseekable.c             \
172         gsimpleasyncresult.c    \
173         gthemedicon.c           \
174         gunionvolumemonitor.c   \
175         gunionvolumemonitor.h   \
176         gvfs.c                  \
177         gvolume.c               \
178         gvolumemonitor.c        \
179         gmountprivate.h         \
180         gioenumtypes.h          \
181         gioenumtypes.c          \
182         gioalias.h              \
183         gioaliasdef.c           \
184         $(appinfo_sources)      \
185         $(unix_sources)         \
186         $(local_sources)        \
187         $(marshal_sources)      \
188         $(NULL)
189
190 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
191
192 libgio_2_0_la_LIBADD = \
193         $(top_builddir)/glib/libglib-2.0.la             \
194         $(top_builddir)/gobject/libgobject-2.0.la       \
195         $(top_builddir)/gmodule/libgmodule-2.0.la       \
196         $(platform_libadd)                              \
197         $(SELINUX_LIBS)                                 \
198         $(GLIB_LIBS)                                    \
199         $(XATTR_LIBS)                                   \
200         $(NULL)
201
202 if OS_WIN32
203 no_undefined = -no-undefined
204 endif
205
206 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
207
208 gio_headers =                   \
209         gappinfo.h              \
210         gasyncresult.h          \
211         gbufferedinputstream.h  \
212         gbufferedoutputstream.h \
213         gcancellable.h          \
214         gcontenttype.h          \
215         gdatainputstream.h      \
216         gdataoutputstream.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