Moved gurifuncs from gio to glib
[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
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 MS_LIB_AVAILABLE
85 noinst_DATA = glib-2.0.lib
86
87 install-ms-lib:
88         $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
89
90 uninstall-ms-lib:
91         -rm $(DESTDIR)$(libdir)/glib-2.0.lib
92 else
93 install-ms-lib:
94 uninstall-ms-lib:
95 endif
96
97 libglib_2_0_la_SOURCES =        \
98         garray.c                \
99         gasyncqueue.c           \
100         gatomic.c               \
101         gbacktrace.c            \
102         gbase64.c               \
103         gbookmarkfile.c         \
104         gbsearcharray.h         \
105         gcache.c                \
106         gcompletion.c           \
107         gconvert.c              \
108         gdataset.c              \
109         gdatasetprivate.h       \
110         gdate.c                 \
111         gdir.c                  \
112         gerror.c                \
113         gfileutils.c            \
114         ghash.c                 \
115         ghook.c                 \
116         giochannel.c            \
117         gkeyfile.c              \
118         glibintl.h              \
119         glist.c                 \
120         gmain.c                 \
121         gmappedfile.c           \
122         gmarkup.c               \
123         gmem.c                  \
124         gmessages.c             \
125         gmirroringtable.h       \
126         gnode.c                 \
127         goption.c               \
128         gpattern.c              \
129         gprimes.c               \
130         gqsort.c                \
131         gqueue.c                \
132         grel.c                  \
133         grand.c                 \
134         $(gregex_c)             \
135         gscanner.c              \
136         gscripttable.h          \
137         gsequence.c             \
138         gshell.c                \
139         gslice.c                \
140         gslist.c                \
141         gstdio.c                \
142         gstrfuncs.c             \
143         gstring.c               \
144         gtestutils.c            \
145         gthread.c               \
146         gthreadprivate.h        \
147         gthreadpool.c           \
148         gtimer.c                \
149         gtree.c                 \
150         guniprop.c              \
151         gutf8.c                 \
152         gunibreak.h             \
153         gunibreak.c             \
154         gunichartables.h        \
155         gunicollate.c           \
156         gunicomp.h              \
157         gunidecomp.h            \
158         gunidecomp.c            \
159         gunicodeprivate.h       \
160         gurifuncs.c             \
161         gutils.c                \
162         gdebug.h                \
163         gprintf.c               \
164         gprintfint.h
165
166 EXTRA_libglib_2_0_la_SOURCES = \
167         giounix.c       \
168         giowin32.c      \
169         gspawn.c        \
170         gspawn-win32.c  \
171         gwin32.c
172
173 glibincludedir=$(includedir)/glib-2.0
174 glibinclude_HEADERS =   \
175         glib-object.h   \
176         glib.h
177
178 glibsubincludedir=$(includedir)/glib-2.0/glib
179 glibsubinclude_HEADERS =   \
180         galloca.h       \
181         garray.h        \
182         gasyncqueue.h   \
183         gatomic.h       \
184         gbacktrace.h    \
185         gbase64.h       \
186         gbookmarkfile.h \
187         gcache.h        \
188         gcompletion.h   \
189         gconvert.h      \
190         gdataset.h      \
191         gdate.h         \
192         gdir.h          \
193         gerror.h        \
194         gfileutils.h    \
195         ghash.h         \
196         ghook.h         \
197         gi18n.h         \
198         gi18n-lib.h     \
199         giochannel.h    \
200         gkeyfile.h      \
201         glist.h         \
202         gmacros.h       \
203         gmain.h         \
204         gmappedfile.h   \
205         gmarkup.h       \
206         gmem.h          \
207         gmessages.h     \
208         gnode.h         \
209         goption.h       \
210         gpattern.h      \
211         gprimes.h       \
212         gqsort.h        \
213         gquark.h        \
214         gqueue.h        \
215         grand.h         \
216         $(gregex_h)     \
217         grel.h          \
218         gscanner.h      \
219         gsequence.h     \
220         gshell.h        \
221         gslice.h        \
222         gslist.h        \
223         gspawn.h        \
224         gstdio.h        \
225         gstrfuncs.h     \
226         gtestutils.h    \
227         gstring.h       \
228         gthread.h       \
229         gthreadpool.h   \
230         gtimer.h        \
231         gtree.h         \
232         gtypes.h        \
233         gunicode.h      \
234         gurifuncs.h             \
235         gutils.h        \
236         gwin32.h        \
237         gprintf.h
238
239 install-data-local: install-ms-lib install-def-file
240         @if test -f $(glibincludedir)/glist.h ; then                                    \
241           echo "*** Old headers found in $(glibincludedir). You should remove the" ;    \
242           echo "*** contents of this directory and type 'make install' again." ;        \
243           false ;                                                                       \
244         fi
245
246 uninstall-local: uninstall-ms-lib uninstall-def-file
247
248 if PLATFORM_WIN32
249 no_undefined = -no-undefined
250 endif
251
252 if OS_WIN32
253 # This requires a very new libtool
254 export_symbols = -export-symbols glib.def
255
256 install-def-file:
257         $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
258
259 uninstall-def-file:
260         -rm $(DESTDIR)$(libdir)/glib-2.0.def
261 else
262 install-def-file:
263 uninstall-def-file:
264
265 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
266 endif
267
268 if OS_WIN32
269 glib_win32_res = glib-win32-res.o
270 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
271 endif
272
273 if ENABLE_REGEX
274 if USE_SYSTEM_PCRE
275 pcre_lib = $(PCRE_LIBS)
276 pcre_inc = $(PCRE_CFLAGS)
277 else
278 pcre_lib = pcre/libpcre.la
279 pcre_inc =
280 endif
281 else
282 pcre_lib =
283 pcre_inc =
284 endif
285
286 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
287 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@
288
289 libglib_2_0_la_LDFLAGS = \
290          $(glib_win32_res_ldflag) \
291         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
292         -export-dynamic $(no_undefined) $(export_symbols)
293
294 INSTALL_PROGS=
295
296 if OS_WIN32
297 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
298 gspawn_win32_helper_LDADD = libglib-2.0.la
299 gspawn_win32_helper_LDFLAGS = -mwindows
300 gspawn_win32_helper_console_LDADD = libglib-2.0.la
301 gspawn-win32-helper-console.c:
302         echo '#include "gspawn-win32-helper.c"' >$@
303
304 glib-win32-res.o: glib.rc
305         $(WINDRES) glib.rc $@
306 endif
307
308 bin_PROGRAMS     = ${INSTALL_PROGS}
309
310 if OS_UNIX
311
312 INSTALL_PROGS   += gtester
313 gtester_SOURCES  = gtester.c
314 gtester_LDADD    = libglib-2.0.la
315
316 endif
317
318 glib-2.0.lib: libglib-2.0.la glib.def
319         lib -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
320
321 dist-hook: $(BUILT_EXTRA_DIST)
322         files='$(BUILT_EXTRA_DIST)'; \
323         for f in $$files; do \
324           if test -f $$f; then d=.; else d=$(srcdir); fi; \
325           cp $$d/$$f $(distdir) || exit 1; done