Revert the patch for bug 527214 and related changes. GTimer
[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
169 EXTRA_libglib_2_0_la_SOURCES = \
170         giounix.c       \
171         giowin32.c      \
172         gspawn.c        \
173         gspawn-win32.c  \
174         gwin32.c
175
176 glibincludedir=$(includedir)/glib-2.0
177 glibinclude_HEADERS =   \
178         glib-object.h   \
179         glib.h
180
181 glibsubincludedir=$(includedir)/glib-2.0/glib
182 glibsubinclude_HEADERS =   \
183         galloca.h       \
184         garray.h        \
185         gasyncqueue.h   \
186         gatomic.h       \
187         gbacktrace.h    \
188         gbase64.h       \
189         gbookmarkfile.h \
190         gcache.h        \
191         gchecksum.h     \
192         gcompletion.h   \
193         gconvert.h      \
194         gdataset.h      \
195         gdate.h         \
196         gdir.h          \
197         gerror.h        \
198         gfileutils.h    \
199         ghash.h         \
200         ghook.h         \
201         gi18n.h         \
202         gi18n-lib.h     \
203         giochannel.h    \
204         gkeyfile.h      \
205         glist.h         \
206         gmacros.h       \
207         gmain.h         \
208         gmappedfile.h   \
209         gmarkup.h       \
210         gmem.h          \
211         gmessages.h     \
212         gnode.h         \
213         goption.h       \
214         gpattern.h      \
215         gprimes.h       \
216         gqsort.h        \
217         gquark.h        \
218         gqueue.h        \
219         grand.h         \
220         $(gregex_h)     \
221         grel.h          \
222         gscanner.h      \
223         gsequence.h     \
224         gshell.h        \
225         gslice.h        \
226         gslist.h        \
227         gspawn.h        \
228         gstdio.h        \
229         gstrfuncs.h     \
230         gtestutils.h    \
231         gstring.h       \
232         gthread.h       \
233         gthreadpool.h   \
234         gtimer.h        \
235         gtree.h         \
236         gtypes.h        \
237         gunicode.h      \
238         gurifuncs.h             \
239         gutils.h        \
240         gwin32.h        \
241         gprintf.h
242
243 install-data-local: install-ms-lib install-def-file
244         @if test -f $(glibincludedir)/glist.h ; then                                    \
245           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
246           echo "*** contents of this directory and type 'make install' again." ;        \
247           false ;                                                                       \
248         fi
249
250 uninstall-local: uninstall-ms-lib uninstall-def-file
251
252 if PLATFORM_WIN32
253 no_undefined = -no-undefined
254 endif
255
256 if OS_WIN32_AND_DLL_COMPILATION
257 export_symbols = -export-symbols glib.def
258
259 glib_win32_res = glib-win32-res.o
260 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
261
262 glib_def = glib.def
263
264 install-def-file:
265         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
266
267 uninstall-def-file:
268         -rm $(DESTDIR)$(libdir)/glib-2.0.def
269 else
270 install-def-file:
271 uninstall-def-file:
272
273 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
274 endif
275
276 if ENABLE_REGEX
277 if USE_SYSTEM_PCRE
278 pcre_lib = $(PCRE_LIBS)
279 pcre_inc = $(PCRE_CFLAGS)
280 else
281 pcre_lib = pcre/libpcre.la
282 pcre_inc =
283 endif
284 else
285 pcre_lib =
286 pcre_inc =
287 endif
288
289 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
290 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
291
292 libglib_2_0_la_LDFLAGS = \
293          $(glib_win32_res_ldflag) \
294         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
295         -export-dynamic $(no_undefined) $(export_symbols)
296
297 INSTALL_PROGS=
298
299 gspawn-win32-helper-console.c:
300         echo '#define HELPER_CONSOLE' >$@
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