Add an mmap() wrapper called GMappedFile. (#148218, David Schleef, Behdad
[platform/upstream/glib.git] / glib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 if HAVE_GOOD_PRINTF
4 else
5 PRINTF_SUBDIR = gnulib
6 printf_la = gnulib/libgnulib.la
7 endif 
8
9 SUBDIRS = libcharset $(PRINTF_SUBDIR)
10
11 DIST_SUBDIRS = libcharset gnulib
12
13 INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \
14         $(GLIB_DEBUG_FLAGS) -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION 
15
16 glib.def: glib.symbols
17         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/        /' -e 's/G_GNUC_[^ ]*//g') > glib.def
18
19 galias.h: glib.symbols
20           $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
21
22 galiasdef.c: glib.symbols
23           $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
24
25 if OS_LINUX
26 if HAVE_GNUC_VISIBILITY
27 TESTS = abicheck.sh
28 endif
29 endif
30
31 BUILT_SOURCES = galias.h galiasdef.c
32
33 EXTRA_DIST =                    \
34         makefile.msc.in         \
35         glib.rc.in              \
36         gen-unicode-tables.pl   \
37         makegalias.pl           \
38         abicheck.sh             \
39         glib.symbols
40
41 # These may be in the builddir too
42 BUILT_EXTRA_DIST =              \
43         makefile.msc            \
44         glib.rc                 \
45         galias.h                \
46         galiasdef.c
47
48 lib_LTLIBRARIES = libglib-2.0.la
49
50 if MS_LIB_AVAILABLE
51 noinst_DATA = glib-2.0.lib
52
53 install-ms-lib:
54         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
55
56 uninstall-ms-lib:
57         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
58 else
59 install-ms-lib:
60 uninstall-ms-lib:
61 endif
62
63 libglib_2_0_la_SOURCES =        \
64         garray.c                \
65         gasyncqueue.c           \
66         gatomic.c               \
67         gbacktrace.c            \
68         gbsearcharray.h         \
69         gcache.c                \
70         gcompletion.c           \
71         gconvert.c              \
72         gdataset.c              \
73         gdatasetprivate.h       \
74         gdate.c                 \
75         gdir.c                  \
76         gerror.c                \
77         gfileutils.c            \
78         ghash.c                 \
79         ghook.c                 \
80         giochannel.c            \
81         gkeyfile.c              \
82         glibintl.h              \
83         glist.c                 \
84         gmain.c                 \
85         gmappedfile.c           \
86         gmarkup.c               \
87         gmem.c                  \
88         gmessages.c             \
89         gnode.c                 \
90         goption.c               \
91         gpattern.c              \
92         gprimes.c               \
93         gqsort.c                \
94         gqueue.c                \
95         grel.c                  \
96         grand.c                 \
97         gscanner.c              \
98         gshell.c                \
99         gslist.c                \
100         gstdio.c                \
101         gstrfuncs.c             \
102         gstring.c               \
103         gthread.c               \
104         gthreadinit.h           \
105         gthreadpool.c           \
106         gtimer.c                \
107         gtree.c                 \
108         guniprop.c              \
109         gutf8.c                 \
110         gunibreak.h             \
111         gunibreak.c             \
112         gunichartables.h        \
113         gunicollate.c           \
114         gunicomp.h              \
115         gunidecomp.h            \
116         gunidecomp.c            \
117         gunicodeprivate.h       \
118         gutils.c                \
119         gdebug.h                \
120         gprintf.c               \
121         gprintfint.h
122
123 EXTRA_libglib_2_0_la_SOURCES = \
124         giounix.c       \
125         giowin32.c      \
126         gspawn.c        \
127         gspawn-win32.c  \
128         gwin32.c
129
130 glibincludedir=$(includedir)/glib-2.0
131 glibinclude_HEADERS =   \
132         glib-object.h   \
133         glib.h
134
135 glibsubincludedir=$(includedir)/glib-2.0/glib
136 glibsubinclude_HEADERS =   \
137         galloca.h       \
138         garray.h        \
139         gasyncqueue.h   \
140         gatomic.h       \
141         gbacktrace.h    \
142         gcache.h        \
143         gcompletion.h   \
144         gconvert.h      \
145         gdataset.h      \
146         gdate.h         \
147         gdir.h          \
148         gerror.h        \
149         gfileutils.h    \
150         ghash.h         \
151         ghook.h         \
152         gi18n.h         \
153         gi18n-lib.h     \
154         giochannel.h    \
155         gkeyfile.h      \
156         glist.h         \
157         gmacros.h       \
158         gmain.h         \
159         gmappedfile.h   \
160         gmarkup.h       \
161         gmem.h          \
162         gmessages.h     \
163         gnode.h         \
164         goption.h       \
165         gpattern.h      \
166         gprimes.h       \
167         gqsort.h        \
168         gquark.h        \
169         gqueue.h        \
170         grand.h         \
171         grel.h          \
172         gscanner.h      \
173         gshell.h        \
174         gslist.h        \
175         gspawn.h        \
176         gstdio.h        \
177         gstrfuncs.h     \
178         gstring.h       \
179         gthread.h       \
180         gthreadpool.h   \
181         gtimer.h        \
182         gtree.h         \
183         gtypes.h        \
184         gunicode.h      \
185         gutils.h        \
186         gwin32.h        \
187         gprintf.h
188
189 install-data-local: install-ms-lib install-libtool-import-lib
190         @if test -f $(glibincludedir)/glist.h ; then                                    \
191           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
192           echo "*** contents of this directory and type 'make install' again." ;        \
193           false ;                                                                       \
194         fi
195
196 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
197
198 if PLATFORM_WIN32
199 no_undefined = -no-undefined
200 endif
201
202 if OS_WIN32
203 # This requires a very new libtool
204 export_symbols = -export-symbols glib.def
205
206 install-libtool-import-lib:
207         $(INSTALL) .libs/libglib-2.0.dll.a $(DESTDIR)$(libdir)
208         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
209
210 uninstall-libtool-import-lib:
211         -rm $(DESTDIR)$(libdir)/libglib-2.0.dll.a $(DESTDIR)$(libdir)/glib-2.0.def
212 else
213 install-libtool-import-lib:
214 uninstall-libtool-import-lib:
215
216 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
217 endif
218
219 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
220 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
221
222 libglib_2_0_la_LDFLAGS = \
223         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
224         -export-dynamic $(no_undefined) $(export_symbols)
225
226 if OS_WIN32
227 bin_PROGRAMS = gspawn-win32-helper
228 gspawn_win32_helper_LDADD = libglib-2.0.la
229 gspawn_win32_helper_LDFLAGS = -mwindows
230
231 $(G_LIB_WIN32_RESOURCE): glib.rc
232         $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
233 endif
234
235 glib-2.0.lib: libglib-2.0.la glib.def
236         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
237
238 dist-hook: $(BUILT_EXTRA_DIST)
239         files='$(BUILT_EXTRA_DIST)'; \
240         for f in $$files; do \
241           if test -f $$f; then d=.; else d=$(srcdir); fi; \
242           cp $$d/$$f $(distdir) || exit 1; done