Expand gio/win32/Makefile.
[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 if OS_WIN32
90 SUBDIRS += win32
91 platform_libadd += win32/libgiowin32.la
92 endif
93
94
95 SUBDIRS += .
96
97 if HAVE_FAM
98 SUBDIRS += fam
99 endif
100
101 if OS_UNIX
102 appinfo_sources += gdesktopappinfo.c gdesktopappinfo.h
103 platform_libadd += xdgmime/libxdgmime.la
104 unix_sources = \
105         gunixmount.c            \
106         gunixmount.h            \
107         gunixmounts.c           \
108         gunixmounts.h           \
109         gunixvolume.c           \
110         gunixvolume.h           \
111         gunixvolumemonitor.c    \
112         gunixvolumemonitor.h    \
113         gunixinputstream.c      \
114         gunixoutputstream.c     \
115         $(NULL)
116
117
118 giounixincludedir=$(includedir)/gio-unix-2.0/gio
119 giounixinclude_HEADERS = \
120         gdesktopappinfo.h       \
121         gunixmounts.h           \
122         gunixinputstream.h      \
123         gunixoutputstream.h     \
124         $(NULL)
125 endif
126
127 if OS_WIN32
128 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
129 platform_libadd += -lshlwapi
130 endif
131
132 SUBDIRS += tests
133
134 libgio_2_0_la_SOURCES =         \
135         gappinfo.c              \
136         gasynchelper.c          \
137         gasynchelper.h          \
138         gasyncresult.c          \
139         gbufferedinputstream.c  \
140         gbufferedoutputstream.c \
141         gcancellable.c          \
142         gcontenttype.c          \
143         gcontenttypeprivate.h   \
144         gdatainputstream.c      \
145         gdataoutputstream.c     \
146         gdrive.c                \
147         gdummyfile.h            \
148         gdummyfile.c            \
149         gfile.c                 \
150         gfileattribute.c        \
151         gfileattribute-priv.h   \
152         gfileenumerator.c       \
153         gfileicon.c             \
154         gfileinfo.c             \
155         gfileinputstream.c      \
156         gfilemonitor.c          \
157         gfilenamecompleter.c    \
158         gfileoutputstream.c     \
159         gfilterinputstream.c    \
160         gfilteroutputstream.c   \
161         gicon.c                 \
162         ginputstream.c          \
163         gioerror.c              \
164         giomodule.c             \
165         giomodule-priv.h        \
166         gioscheduler.c          \
167         gloadableicon.c         \
168         gmount.c                \
169         gmemoryinputstream.c    \
170         gmemoryoutputstream.c   \
171         gmountoperation.c       \
172         gnativevolumemonitor.c  \
173         gnativevolumemonitor.h  \
174         goutputstream.c         \
175         gpollfilemonitor.c      \
176         gpollfilemonitor.h      \
177         gseekable.c             \
178         gsimpleasyncresult.c    \
179         gthemedicon.c           \
180         gunionvolumemonitor.c   \
181         gunionvolumemonitor.h   \
182         gvfs.c                  \
183         gvolume.c               \
184         gvolumemonitor.c        \
185         gmountprivate.h         \
186         gioenumtypes.h          \
187         gioenumtypes.c          \
188         gioalias.h              \
189         gioaliasdef.c           \
190         $(appinfo_sources)      \
191         $(unix_sources)         \
192         $(local_sources)        \
193         $(marshal_sources)      \
194         $(NULL)
195
196 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
197
198 libgio_2_0_la_LIBADD = \
199         $(top_builddir)/glib/libglib-2.0.la             \
200         $(top_builddir)/gobject/libgobject-2.0.la       \
201         $(top_builddir)/gmodule/libgmodule-2.0.la       \
202         $(platform_libadd)                              \
203         $(SELINUX_LIBS)                                 \
204         $(GLIB_LIBS)                                    \
205         $(XATTR_LIBS)                                   \
206         $(NULL)
207
208 if OS_WIN32
209 no_undefined = -no-undefined
210 endif
211
212 libgio_2_0_la_LDFLAGS= -export-dynamic $(no_undefined) -export-symbols-regex '^g_.*'
213
214 gio_headers =                   \
215         gappinfo.h              \
216         gasyncresult.h          \
217         gbufferedinputstream.h  \
218         gbufferedoutputstream.h \
219         gcancellable.h          \
220         gcontenttype.h          \
221         gdatainputstream.h      \
222         gdataoutputstream.h     \
223         gdrive.h                \
224         gfile.h                 \
225         gfileattribute.h        \
226         gfileenumerator.h       \
227         gfileicon.h             \
228         gfileinfo.h             \
229         gfileinputstream.h      \
230         gfilemonitor.h          \
231         gfilenamecompleter.h    \
232         gfileoutputstream.h     \
233         gfilterinputstream.h    \
234         gfilteroutputstream.h   \
235         gicon.h                 \
236         ginputstream.h          \
237         gio.h                   \
238         gioenumtypes.h          \
239         gioerror.h              \
240         giomodule.h             \
241         gioscheduler.h          \
242         gloadableicon.h         \
243         gmount.h                \
244         gmemoryinputstream.h    \
245         gmemoryoutputstream.h   \
246         gmountoperation.h       \
247         gnativevolumemonitor.h  \
248         goutputstream.h         \
249         gseekable.h             \
250         gsimpleasyncresult.h    \
251         gthemedicon.h           \
252         gvfs.h                  \
253         gvolume.h               \
254         gvolumemonitor.h        \
255         $(NULL)
256
257 gioincludedir=$(includedir)/glib-2.0/gio/
258 gioinclude_HEADERS =            \
259         $(gio_headers)          \
260         gioenumtypes.h
261
262 # these sources (also mentioned above) are generated.
263 BUILT_SOURCES =                 \
264         gio-marshal.h           \
265         gio-marshal.c           \
266         gioalias.h              \
267         gioaliasdef.c           \
268         gioenumtypes.h          \
269         gioenumtypes.c          \
270         $(NULL)
271
272 EXTRA_DIST +=                   \
273         gio-marshal.list        \
274         gio.symbols             \
275         gioenumtypes.h.template \
276         gioenumtypes.c.template \
277         makegioalias.pl         \
278         abicheck.sh             \
279         pltcheck.sh             \
280         $(NULL)
281
282 CLEANFILES =                    \
283         $(marshal_sources)      \
284         $(NULL)
285
286 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
287         ( top_builddir=`cd $(top_builddir) && pwd`; \
288           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
289             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
290
291 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
292         ( top_builddir=`cd $(top_builddir) && pwd`; \
293           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
294             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c