Bug 503071 - Application direction changes to right to left even if theres
[platform/upstream/glib.git] / glib / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
3
4 if HAVE_GOOD_PRINTF
5 else
6 PRINTF_SUBDIR = gnulib
7 printf_la = gnulib/libgnulib.la
8 endif 
9
10 if ENABLE_REGEX
11 if USE_SYSTEM_PCRE
12 else
13 MAYBE_PCRE = pcre 
14 endif
15 gregex_c = gregex.c
16 gregex_h = gregex.h
17 else
18 gregex_c =
19 gregex_h =
20 endif
21
22 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
23
24 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
25
26 AM_CPPFLAGS =                           \
27         -I$(top_srcdir)                 \
28         $(pcre_inc)                     \
29         -DG_LOG_DOMAIN=\"GLib\"         \
30         $(GLIB_DEBUG_FLAGS)             \
31         -DG_DISABLE_DEPRECATED          \
32         -DGLIB_COMPILATION              \
33         -DPCRE_STATIC
34
35 glib.def: glib.symbols
36         (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
37
38 galias.h: glib.symbols
39           $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
40
41 galiasdef.c: glib.symbols
42           $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
43
44 if OS_LINUX
45 if HAVE_GNUC_VISIBILITY
46 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
47 TESTS = abicheck.sh pltcheck.sh
48 endif
49 endif
50
51 BUILT_SOURCES = galias.h galiasdef.c
52
53 MIRRORING_TAB_SOURCE =                          \
54         glib-mirroring-tab/Makefile             \
55         glib-mirroring-tab/gen-mirroring-tab.c  \
56         glib-mirroring-tab/packtab.h            \
57         glib-mirroring-tab/packtab.c
58
59 # The compilation of GRegex can be disabled, but the source files must
60 # be distributed.
61 EXTRA_DIST +=                   \
62         makefile.msc.in         \
63         glib.rc.in              \
64         gen-unicode-tables.pl   \
65         gen-script-table.pl     \
66         makegalias.pl           \
67         abicheck.sh             \
68         pltcheck.sh             \
69         glib.symbols            \
70         gregex.c                \
71         gregex.h                \
72         win_iconv.c             \
73         $(MIRRORING_TAB_SOURCE)
74
75 # These may be in the builddir too
76 BUILT_EXTRA_DIST =              \
77         makefile.msc            \
78         glib.rc                 \
79         galias.h                \
80         galiasdef.c
81
82 lib_LTLIBRARIES = libglib-2.0.la
83
84 if OS_WIN32_AND_DLL_COMPILATION
85 if MS_LIB_AVAILABLE
86 noinst_DATA = glib-2.0.lib
87
88 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
89 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
90 endif
91 endif
92
93 install-ms-lib:
94         $(install_ms_lib_cmd)
95
96 uninstall-ms-lib:
97         $(uninstall_ms_lib_cmd)
98
99 libglib_2_0_la_SOURCES =        \
100         garray.c                \
101         gasyncqueue.c           \
102         gatomic.c               \
103         gbacktrace.c            \
104         gbase64.c               \
105         gbookmarkfile.c         \
106         gbsearcharray.h         \
107         gcache.c                \
108         gchecksum.c             \
109         gcompletion.c           \
110         gconvert.c              \
111         gdataset.c              \
112         gdatasetprivate.h       \
113         gdate.c                 \
114         gdir.c                  \
115         gerror.c                \
116         gfileutils.c            \
117         ghash.c                 \
118         ghook.c                 \
119         giochannel.c            \
120         gkeyfile.c              \
121         glibintl.h              \
122         glist.c                 \
123         gmain.c                 \
124         gmappedfile.c           \
125         gmarkup.c               \
126         gmem.c                  \
127         gmessages.c             \
128         gmirroringtable.h       \
129         gnode.c                 \
130         goption.c               \
131         gpattern.c              \
132         gprimes.c               \
133         gqsort.c                \
134         gqueue.c                \
135         grel.c                  \
136         grand.c                 \
137         $(gregex_c)             \
138         gscanner.c              \
139         gscripttable.h          \
140         gsequence.c             \
141         gshell.c                \
142         gslice.c                \
143         gslist.c                \
144         gstdio.c                \
145         gstrfuncs.c             \
146         gstring.c               \
147         gtestutils.c            \
148         gthread.c               \
149         gthreadprivate.h        \
150         gthreadpool.c           \
151         gtimer.c                \
152         gtree.c                 \
153         guniprop.c              \
154         gutf8.c                 \
155         gunibreak.h             \
156         gunibreak.c             \
157         gunichartables.h        \
158         gunicollate.c           \
159         gunicomp.h              \
160         gunidecomp.h            \
161         gunidecomp.c            \
162         gunicodeprivate.h       \
163         gurifuncs.c             \
164         gutils.c                \
165         gdebug.h                \
166         gprintf.c               \
167         gprintfint.h            \
168         gi18n.c
169
170 EXTRA_libglib_2_0_la_SOURCES = \
171         giounix.c       \
172         giowin32.c      \
173         gspawn.c        \
174         gspawn-win32.c  \
175         gwin32.c
176
177 glibincludedir=$(includedir)/glib-2.0
178 glibinclude_HEADERS =   \
179         glib-object.h   \
180         glib.h
181
182 glibsubincludedir=$(includedir)/glib-2.0/glib
183 glibsubinclude_HEADERS =   \
184         galloca.h       \
185         garray.h        \
186         gasyncqueue.h   \
187         gatomic.h       \
188         gbacktrace.h    \
189         gbase64.h       \
190         gbookmarkfile.h \
191         gcache.h        \
192         gchecksum.h     \
193         gcompletion.h   \
194         gconvert.h      \
195         gdataset.h      \
196         gdate.h         \
197         gdir.h          \
198         gerror.h        \
199         gfileutils.h    \
200         ghash.h         \
201         ghook.h         \
202         gi18n.h         \
203         gi18n-lib.h     \
204         giochannel.h    \
205         gkeyfile.h      \
206         glist.h         \
207         gmacros.h       \
208         gmain.h         \
209         gmappedfile.h   \
210         gmarkup.h       \
211         gmem.h          \
212         gmessages.h     \
213         gnode.h         \
214         goption.h       \
215         gpattern.h      \
216         gprimes.h       \
217         gqsort.h        \
218         gquark.h        \
219         gqueue.h        \
220         grand.h         \
221         $(gregex_h)     \
222         grel.h          \
223         gscanner.h      \
224         gsequence.h     \
225         gshell.h        \
226         gslice.h        \
227         gslist.h        \
228         gspawn.h        \
229         gstdio.h        \
230         gstrfuncs.h     \
231         gtestutils.h    \
232         gstring.h       \
233         gthread.h       \
234         gthreadpool.h   \
235         gtimer.h        \
236         gtree.h         \
237         gtypes.h        \
238         gunicode.h      \
239         gurifuncs.h             \
240         gutils.h        \
241         gwin32.h        \
242         gprintf.h
243
244 install-data-local: install-ms-lib install-def-file
245         @if test -f $(glibincludedir)/glist.h ; then                                    \
246           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
247           echo "*** contents of this directory and type 'make install' again." ;        \
248           false ;                                                                       \
249         fi
250
251 uninstall-local: uninstall-ms-lib uninstall-def-file
252
253 if PLATFORM_WIN32
254 no_undefined = -no-undefined
255 endif
256
257 if OS_WIN32_AND_DLL_COMPILATION
258 export_symbols = -export-symbols glib.def
259
260 glib_win32_res = glib-win32-res.o
261 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
262
263 glib_def = glib.def
264
265 install-def-file:
266         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
267
268 uninstall-def-file:
269         -rm $(DESTDIR)$(libdir)/glib-2.0.def
270 else
271 install-def-file:
272 uninstall-def-file:
273
274 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
275 endif
276
277 if ENABLE_REGEX
278 if USE_SYSTEM_PCRE
279 pcre_lib = $(PCRE_LIBS)
280 pcre_inc = $(PCRE_CFLAGS)
281 else
282 pcre_lib = pcre/libpcre.la
283 pcre_inc =
284 endif
285 else
286 pcre_lib =
287 pcre_inc =
288 endif
289
290 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
291 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
292
293 libglib_2_0_la_LDFLAGS = \
294          $(glib_win32_res_ldflag) \
295         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
296         -export-dynamic $(no_undefined) $(export_symbols)
297
298 INSTALL_PROGS=
299
300 gspawn-win32-helper-console.c:
301         echo '#include "gspawn-win32-helper.c"' >$@
302
303 if OS_WIN32
304 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
305 gspawn_win32_helper_LDADD = libglib-2.0.la
306 gspawn_win32_helper_LDFLAGS = -mwindows
307 gspawn_win32_helper_console_LDADD = libglib-2.0.la
308 endif
309
310 glib-win32-res.o: glib.rc
311         $(WINDRES) glib.rc $@
312
313 bin_PROGRAMS     = ${INSTALL_PROGS}
314
315 if OS_UNIX
316
317 INSTALL_PROGS   += gtester
318 gtester_SOURCES  = gtester.c
319 gtester_LDADD    = libglib-2.0.la
320
321 auto_config_binscripts = gtester-report
322 bin_SCRIPTS = ${auto_config_binscripts}
323 EXTRA_DIST += ${auto_config_binscripts}
324
325 CONFIGVARS = \
326         "bindir"        : "${bindir}",          \
327         "glib-version"  : "${GLIB_VERSION}"
328
329 install-exec-hook:
330         for sf in ${auto_config_binscripts} ; do \
331           mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
332           && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
333             -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@|  ${CONFIGVARS}|' \
334             -e '1,1s|#!/usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
335           || exit $$? ; \
336           rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
337         done
338
339 endif
340
341 glib-2.0.lib: libglib-2.0.la glib.def
342         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
343
344 dist-hook: $(BUILT_EXTRA_DIST)
345         files='$(BUILT_EXTRA_DIST)'; \
346         for f in $$files; do \
347           if test -f $$f; then d=.; else d=$(srcdir); fi; \
348           cp $$d/$$f $(distdir) || exit 1; done