new slice allocator implementation.
[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 MIRRORING_TAB_SOURCES =                         \
34         glib-mirroring-tab/Makefile             \
35         glib-mirroring-tab/gen-mirroring-tab.c  \
36         glib-mirroring-tab/packtab.h            \
37         glib-mirroring-tab/packtab.c
38
39 EXTRA_DIST =                    \
40         makefile.msc.in         \
41         glib.rc.in              \
42         gen-unicode-tables.pl   \
43         makegalias.pl           \
44         abicheck.sh             \
45         glib.symbols            \
46         $(MIRRORING_TAB_SOURCES)
47
48 # These may be in the builddir too
49 BUILT_EXTRA_DIST =              \
50         makefile.msc            \
51         glib.rc                 \
52         galias.h                \
53         galiasdef.c
54
55 lib_LTLIBRARIES = libglib-2.0.la
56
57 if MS_LIB_AVAILABLE
58 noinst_DATA = glib-2.0.lib
59
60 install-ms-lib:
61         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
62
63 uninstall-ms-lib:
64         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
65 else
66 install-ms-lib:
67 uninstall-ms-lib:
68 endif
69
70 libglib_2_0_la_SOURCES =        \
71         garray.c                \
72         gasyncqueue.c           \
73         gatomic.c               \
74         gbacktrace.c            \
75         gbsearcharray.h         \
76         gcache.c                \
77         gcompletion.c           \
78         gconvert.c              \
79         gdataset.c              \
80         gdatasetprivate.h       \
81         gdate.c                 \
82         gdir.c                  \
83         gerror.c                \
84         gfileutils.c            \
85         ghash.c                 \
86         ghook.c                 \
87         giochannel.c            \
88         gkeyfile.c              \
89         glibintl.h              \
90         glist.c                 \
91         gmain.c                 \
92         gmappedfile.c           \
93         gmarkup.c               \
94         gmem.c                  \
95         gmessages.c             \
96         gmirroringtable.h       \
97         gnode.c                 \
98         goption.c               \
99         gpattern.c              \
100         gprimes.c               \
101         gqsort.c                \
102         gqueue.c                \
103         grel.c                  \
104         grand.c                 \
105         gscanner.c              \
106         gshell.c                \
107         gslice.c                \
108         gslist.c                \
109         gstdio.c                \
110         gstrfuncs.c             \
111         gstring.c               \
112         gthread.c               \
113         gthreadinit.h           \
114         gthreadpool.c           \
115         gtimer.c                \
116         gtree.c                 \
117         guniprop.c              \
118         gutf8.c                 \
119         gunibreak.h             \
120         gunibreak.c             \
121         gunichartables.h        \
122         gunicollate.c           \
123         gunicomp.h              \
124         gunidecomp.h            \
125         gunidecomp.c            \
126         gunicodeprivate.h       \
127         gutils.c                \
128         gdebug.h                \
129         gprintf.c               \
130         gprintfint.h
131
132 EXTRA_libglib_2_0_la_SOURCES = \
133         giounix.c       \
134         giowin32.c      \
135         gspawn.c        \
136         gspawn-win32.c  \
137         gwin32.c
138
139 glibincludedir=$(includedir)/glib-2.0
140 glibinclude_HEADERS =   \
141         glib-object.h   \
142         glib.h
143
144 glibsubincludedir=$(includedir)/glib-2.0/glib
145 glibsubinclude_HEADERS =   \
146         galloca.h       \
147         garray.h        \
148         gasyncqueue.h   \
149         gatomic.h       \
150         gbacktrace.h    \
151         gcache.h        \
152         gcompletion.h   \
153         gconvert.h      \
154         gdataset.h      \
155         gdate.h         \
156         gdir.h          \
157         gerror.h        \
158         gfileutils.h    \
159         ghash.h         \
160         ghook.h         \
161         gi18n.h         \
162         gi18n-lib.h     \
163         giochannel.h    \
164         gkeyfile.h      \
165         glist.h         \
166         gmacros.h       \
167         gmain.h         \
168         gmappedfile.h   \
169         gmarkup.h       \
170         gmem.h          \
171         gmessages.h     \
172         gnode.h         \
173         goption.h       \
174         gpattern.h      \
175         gprimes.h       \
176         gqsort.h        \
177         gquark.h        \
178         gqueue.h        \
179         grand.h         \
180         grel.h          \
181         gscanner.h      \
182         gshell.h        \
183         gslice.h        \
184         gslist.h        \
185         gspawn.h        \
186         gstdio.h        \
187         gstrfuncs.h     \
188         gstring.h       \
189         gthread.h       \
190         gthreadpool.h   \
191         gtimer.h        \
192         gtree.h         \
193         gtypes.h        \
194         gunicode.h      \
195         gutils.h        \
196         gwin32.h        \
197         gprintf.h
198
199 install-data-local: install-ms-lib install-def-file
200         @if test -f $(glibincludedir)/glist.h ; then                                    \
201           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
202           echo "*** contents of this directory and type 'make install' again." ;        \
203           false ;                                                                       \
204         fi
205
206 uninstall-local: uninstall-ms-lib uninstall-def-file
207
208 if PLATFORM_WIN32
209 no_undefined = -no-undefined
210 endif
211
212 if OS_WIN32
213 # This requires a very new libtool
214 export_symbols = -export-symbols glib.def
215
216 install-def-file:
217         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
218
219 uninstall-def-file:
220         -rm $(DESTDIR)$(libdir)/glib-2.0.def
221 else
222 install-def-file:
223 uninstall-def-file:
224
225 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
226 endif
227
228 if OS_WIN32
229 glib_win32_res = glib-win32-res.o
230 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
231 endif
232
233 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
234 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@
235
236 libglib_2_0_la_LDFLAGS = \
237          $(glib_win32_res_ldflag) \
238         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
239         -export-dynamic $(no_undefined) $(export_symbols)
240
241 if OS_WIN32
242 bin_PROGRAMS = gspawn-win32-helper gspawn-win32-helper-console
243 gspawn_win32_helper_LDADD = libglib-2.0.la
244 gspawn_win32_helper_LDFLAGS = -mwindows
245 gspawn_win32_helper_console_LDADD = libglib-2.0.la
246
247 glib-win32-res.o: glib.rc
248         $(WINDRES) glib.rc $@
249 endif
250
251 gspawn-win32-helper-console.c:
252         echo '#include "gspawn-win32-helper.c"' >$@
253
254 glib-2.0.lib: libglib-2.0.la glib.def
255         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
256
257 dist-hook: $(BUILT_EXTRA_DIST)
258         files='$(BUILT_EXTRA_DIST)'; \
259         for f in $$files; do \
260           if test -f $$f; then d=.; else d=$(srcdir); fi; \
261           cp $$d/$$f $(distdir) || exit 1; done