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