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