Apply a patch from Behdad Esfahbod to use a faster lookup table for
[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         gslist.c                \
108         gstdio.c                \
109         gstrfuncs.c             \
110         gstring.c               \
111         gthread.c               \
112         gthreadinit.h           \
113         gthreadpool.c           \
114         gtimer.c                \
115         gtree.c                 \
116         guniprop.c              \
117         gutf8.c                 \
118         gunibreak.h             \
119         gunibreak.c             \
120         gunichartables.h        \
121         gunicollate.c           \
122         gunicomp.h              \
123         gunidecomp.h            \
124         gunidecomp.c            \
125         gunicodeprivate.h       \
126         gutils.c                \
127         gdebug.h                \
128         gprintf.c               \
129         gprintfint.h
130
131 EXTRA_libglib_2_0_la_SOURCES = \
132         giounix.c       \
133         giowin32.c      \
134         gspawn.c        \
135         gspawn-win32.c  \
136         gwin32.c
137
138 glibincludedir=$(includedir)/glib-2.0
139 glibinclude_HEADERS =   \
140         glib-object.h   \
141         glib.h
142
143 glibsubincludedir=$(includedir)/glib-2.0/glib
144 glibsubinclude_HEADERS =   \
145         galloca.h       \
146         garray.h        \
147         gasyncqueue.h   \
148         gatomic.h       \
149         gbacktrace.h    \
150         gcache.h        \
151         gcompletion.h   \
152         gconvert.h      \
153         gdataset.h      \
154         gdate.h         \
155         gdir.h          \
156         gerror.h        \
157         gfileutils.h    \
158         ghash.h         \
159         ghook.h         \
160         gi18n.h         \
161         gi18n-lib.h     \
162         giochannel.h    \
163         gkeyfile.h      \
164         glist.h         \
165         gmacros.h       \
166         gmain.h         \
167         gmappedfile.h   \
168         gmarkup.h       \
169         gmem.h          \
170         gmessages.h     \
171         gnode.h         \
172         goption.h       \
173         gpattern.h      \
174         gprimes.h       \
175         gqsort.h        \
176         gquark.h        \
177         gqueue.h        \
178         grand.h         \
179         grel.h          \
180         gscanner.h      \
181         gshell.h        \
182         gslist.h        \
183         gspawn.h        \
184         gstdio.h        \
185         gstrfuncs.h     \
186         gstring.h       \
187         gthread.h       \
188         gthreadpool.h   \
189         gtimer.h        \
190         gtree.h         \
191         gtypes.h        \
192         gunicode.h      \
193         gutils.h        \
194         gwin32.h        \
195         gprintf.h
196
197 install-data-local: install-ms-lib install-def-file
198         @if test -f $(glibincludedir)/glist.h ; then                                    \
199           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
200           echo "*** contents of this directory and type 'make install' again." ;        \
201           false ;                                                                       \
202         fi
203
204 uninstall-local: uninstall-ms-lib uninstall-def-file
205
206 if PLATFORM_WIN32
207 no_undefined = -no-undefined
208 endif
209
210 if OS_WIN32
211 # This requires a very new libtool
212 export_symbols = -export-symbols glib.def
213
214 install-def-file:
215         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
216
217 uninstall-def-file:
218         -rm $(DESTDIR)$(libdir)/glib-2.0.def
219 else
220 install-def-file:
221 uninstall-def-file:
222
223 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
224 endif
225
226 if OS_WIN32
227 glib_win32_res = glib-win32-res.o
228 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
229 endif
230
231 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
232 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@
233
234 libglib_2_0_la_LDFLAGS = \
235          $(glib_win32_res_ldflag) \
236         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
237         -export-dynamic $(no_undefined) $(export_symbols)
238
239 if OS_WIN32
240 bin_PROGRAMS = gspawn-win32-helper gspawn-win32-helper-console
241 gspawn_win32_helper_LDADD = libglib-2.0.la
242 gspawn_win32_helper_LDFLAGS = -mwindows
243 gspawn_win32_helper_console_LDADD = libglib-2.0.la
244
245 glib-win32-res.o: glib.rc
246         $(WINDRES) glib.rc $@
247 endif
248
249 gspawn-win32-helper-console.c:
250         echo '#include "gspawn-win32-helper.c"' >$@
251
252 glib-2.0.lib: libglib-2.0.la glib.def
253         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
254
255 dist-hook: $(BUILT_EXTRA_DIST)
256         files='$(BUILT_EXTRA_DIST)'; \
257         for f in $$files; do \
258           if test -f $$f; then d=.; else d=$(srcdir); fi; \
259           cp $$d/$$f $(distdir) || exit 1; done