Templates for enum registration
[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         gioscheduler.c          \
150         gloadableicon.c         \
151         gmemoryinputstream.c    \
152         gmemoryoutputstream.c   \
153         gmountoperation.c       \
154         gnativevolumemonitor.c  \
155         gnativevolumemonitor.h  \
156         goutputstream.c         \
157         gpollfilemonitor.c      \
158         gpollfilemonitor.h      \
159         gseekable.c             \
160         gsimpleasyncresult.c    \
161         gthemedicon.c           \
162         gunionvolumemonitor.c   \
163         gunionvolumemonitor.h   \
164         gvfs.c                  \
165         gvolume.c               \
166         gvolumemonitor.c        \
167         gvolumeprivate.h        \
168         gioenumtypes.h          \
169         gioenumtypes.c          \
170         $(appinfo_sources)      \
171         $(unix_sources)         \
172         $(local_sources)        \
173         $(marshal_sources)      \
174         $(NULL)
175
176 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
177
178 libgio_2_0_la_LIBADD = \
179         $(top_builddir)/glib/libglib-2.0.la             \
180         $(top_builddir)/gobject/libgobject-2.0.la       \
181         $(top_builddir)/gmodule/libgmodule-2.0.la       \
182         $(platform_libadd)                              \
183         $(SELINUX_LIBS)                                 \
184         $(GLIB_LIBS)                                    \
185         $(XATTR_LIBS)                                   \
186         $(NULL)
187
188 if OS_WIN32
189 no_undefined = -no-undefined
190 endif
191
192 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
193
194 gio_headers =                   \
195         gappinfo.h              \
196         gasyncresult.h          \
197         gbufferedinputstream.h  \
198         gbufferedoutputstream.h \
199         gcancellable.h          \
200         gcontenttype.h          \
201         gdatainputstream.h      \
202         gdataoutputstream.h     \
203         gdirectorymonitor.h     \
204         gdrive.h                \
205         gfile.h                 \
206         gfileattribute.h        \
207         gfileenumerator.h       \
208         gfileicon.h             \
209         gfileinfo.h             \
210         gfileinputstream.h      \
211         gfilemonitor.h          \
212         gfilenamecompleter.h    \
213         gfileoutputstream.h     \
214         gfilterinputstream.h    \
215         gfilteroutputstream.h   \
216         gicon.h                 \
217         ginputstream.h          \
218         gio.h                   \
219         gioerror.h              \
220         giomodule.h             \
221         gioscheduler.h          \
222         gloadableicon.h         \
223         gmemoryinputstream.h    \
224         gmemoryoutputstream.h   \
225         gmountoperation.h       \
226         goutputstream.h         \
227         gseekable.h             \
228         gsimpleasyncresult.h    \
229         gthemedicon.h           \
230         gvfs.h                  \
231         gvolume.h               \
232         gvolumemonitor.h        \
233         $(NULL)
234
235 gioincludedir=$(includedir)/glib-2.0/gio/
236 gioinclude_HEADERS =            \
237         $(gio_headers)          \
238         gioenumtypes.h
239
240 # these sources (also mentioned above) are generated.
241 BUILT_SOURCES =                 \
242         gio-marshal.h           \
243         gio-marshal.c           \
244         gioalias.h              \
245         gioaliasdef.c           \
246         gioenumtypes.h          \
247         gioenumtypes.c          \
248         $(NULL)
249
250 EXTRA_DIST =                    \
251         gio-marshal.list        \
252         gio.symbols             \
253         gioenumtypes.h.template \
254         gioenumtypes.c.template \
255         $(NULL)
256
257 CLEANFILES =                    \
258         $(marshal_sources)      \
259         $(NULL)
260
261 gioenumtypes.h: $(gio_headers)
262         ( cd $(srcdir) && $(top_builddir)/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > gioenumtypes.h
263         
264 gioenumtypes.c: $(gio_headers)
265         ( cd $(srcdir) && $(top_builddir)/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > gioenumtypes.c
266