1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
9 # Generate glibconfig.h
11 # The timestamp of the stamp file is used to indicate if glibconfig.h is
12 # up to date with respect to config.status. In the usual case, changes
13 # to config.status will not result in changes to glibconfig.h so we
14 # avoid touching its timestamp (in order not to rebuild the whole tree).
16 DISTCLEANFILES += glibconfig-stamp glibconfig.h
17 BUILT_SOURCES += glibconfig-stamp
18 configexecincludedir = $(libdir)/glib-2.0/include
19 nodist_configexecinclude_HEADERS = glibconfig.h
20 glibconfig-stamp: ../config.status
21 $(AM_V_GEN) cd $(top_builddir) && \
22 $(SHELL) ./config.status glib/glibconfig.h
23 @touch glibconfig-stamp
29 PRINTF_SUBDIR = gnulib
30 printf_la = gnulib/libgnulib.la
38 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
39 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
40 if BUILD_MODULAR_TESTS
47 -DG_LOG_DOMAIN=\"GLib\" \
48 -DGLIB_LOCALE_DIR=\"$(localedir)\" \
53 glib.def: glib.symbols
54 $(AM_V_GEN) (echo EXPORTS; $(CPP) -P -DG_OS_WIN32 - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /') > $(builddir)/glib.def
57 if HAVE_GNUC_VISIBILITY
58 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
63 MIRRORING_TAB_SOURCE = \
64 glib-mirroring-tab/Makefile \
65 glib-mirroring-tab/gen-mirroring-tab.c \
66 glib-mirroring-tab/packtab.h \
67 glib-mirroring-tab/packtab.c
69 # The compilation of GRegex can be disabled, but the source files must
75 gen-unicode-tables.pl \
77 glibconfig.h.win32.in \
86 $(MIRRORING_TAB_SOURCE)
88 CLEANFILES= libglib-gdb.py
90 # These may be in the builddir too
96 lib_LTLIBRARIES = libglib-2.0.la
98 if OS_WIN32_AND_DLL_COMPILATION
100 noinst_DATA = glib-2.0.lib
102 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
103 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
108 $(install_ms_lib_cmd)
111 $(uninstall_ms_lib_cmd)
113 deprecated_sources = \
114 deprecated/gallocator.c \
115 deprecated/gcache.c \
116 deprecated/gcompletion.c \
118 deprecated/gthread-deprecated.c
120 libglib_2_0_la_SOURCES = \
121 $(deprecated_sources) \
125 gasyncqueueprivate.h \
209 gvariant-internal.h \
211 gvariant-serialiser.h \
212 gvariant-serialiser.c \
223 libglib_2_0_la_SOURCES += glib-unix.c
227 libglib_2_0_la_SOURCES += gthread-win32.c
229 libglib_2_0_la_SOURCES += gthread-posix.c
232 EXTRA_libglib_2_0_la_SOURCES = \
239 glibincludedir=$(includedir)/glib-2.0
240 glibinclude_HEADERS = \
245 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
246 deprecatedinclude_HEADERS = \
247 deprecated/gallocator.h \
248 deprecated/gcache.h \
249 deprecated/gcompletion.h \
254 glibsubincludedir=$(includedir)/glib-2.0/glib
255 glibsubinclude_HEADERS = \
329 # This is read by gobject-introspection/misc/ and gtk-doc
330 glib-public-headers.txt: Makefile
331 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
333 CLEANFILES += glib-public-headers.txt
335 all-local: glib-public-headers.txt
337 install-data-local: install-ms-lib install-def-file
338 @if test -f $(glibincludedir)/glist.h ; then \
339 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
340 echo "*** contents of this directory and type 'make install' again." ; \
344 uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-gdb
347 no_undefined = -no-undefined
350 if OS_WIN32_AND_DLL_COMPILATION
351 export_symbols = -export-symbols $(builddir)/glib.def
353 glib_win32_res = glib-win32-res.o
354 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
359 $(INSTALL) $(builddir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
362 -rm $(DESTDIR)$(libdir)/glib-2.0.def
367 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
371 pcre_lib = $(PCRE_LIBS)
372 pcre_inc = $(PCRE_CFLAGS)
374 pcre_lib = pcre/libpcre.la
378 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD)
379 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
381 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
382 $(glib_win32_res_ldflag) \
383 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
384 -export-dynamic $(no_undefined) $(export_symbols)
389 glib_probes.h: glib_probes.d Makefile
390 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
391 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
392 glib_probes.o: glib_probes.d Makefile
393 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
394 BUILT_SOURCES += glib_probes.h glib_probes.o
395 CLEANFILES += glib_probes.h glib_probes.h.tmp
396 libglib_2_0_la_LIBADD += glib_probes.o
400 tapset_in_files = glib.stp.in
401 tapsetdir = @ABS_TAPSET_DIR@
402 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
403 EXTRA_DIST += $(tapset_in_files)
406 gspawn-win32-helper-console.c:
407 echo '#define HELPER_CONSOLE' >$@
408 echo '#include "gspawn-win32-helper.c"' >>$@
410 gspawn-win64-helper.c:
411 echo '#include "gspawn-win32-helper.c"' >$@
413 gspawn-win64-helper-console.c:
414 echo '#define HELPER_CONSOLE' >$@
415 echo '#include "gspawn-win32-helper.c"' >>$@
420 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
421 gspawn_win64_helper_LDADD = libglib-2.0.la
422 gspawn_win64_helper_LDFLAGS = -mwindows
423 gspawn_win64_helper_console_LDADD = libglib-2.0.la
425 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
426 gspawn_win32_helper_LDADD = libglib-2.0.la
427 gspawn_win32_helper_LDFLAGS = -mwindows
428 gspawn_win32_helper_console_LDADD = libglib-2.0.la
432 glib-win32-res.o: glib.rc
433 $(WINDRES) glib.rc $@
435 bin_PROGRAMS = ${INSTALL_PROGS}
439 INSTALL_PROGS += gtester
440 gtester_SOURCES = gtester.c
441 gtester_LDADD = libglib-2.0.la
443 auto_config_binscripts = gtester-report
444 bin_SCRIPTS = ${auto_config_binscripts}
445 EXTRA_DIST += ${auto_config_binscripts}
448 "bindir" : "${bindir}", \
449 "glib-version" : "${GLIB_VERSION}"
452 for sf in ${auto_config_binscripts} ; do \
453 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
454 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
455 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
456 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
458 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
459 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
464 glib-2.0.lib: libglib-2.0.la glib.def
465 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
467 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
468 files='$(BUILT_EXTRA_DIST)'; \
469 for f in $$files; do \
470 if test -f $$f; then d=.; else d=$(srcdir); fi; \
471 cp $$d/$$f $(distdir) || exit 1; done
473 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
474 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
476 *-unix.c|gthread-*.c) \
478 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
481 done >libglib.sourcefiles
482 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
483 rm libglib.sourcefiles
485 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
486 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
488 *-unix.c|gthread-*.c) \
490 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
493 done >libglib.vs10.sourcefiles
494 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
495 rm libglib.vs10.sourcefiles
497 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
498 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
500 *-unix.c|gthread-*.c) \
502 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
505 done >libglib.vs10.sourcefiles.filters
506 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
507 rm libglib.vs10.sourcefiles.filters
509 # install gdb scripts
510 gdbdir = $(datadir)/glib-2.0/gdb
511 dist_gdb_SCRIPTS = glib.py
513 libglib-gdb.py: libglib-gdb.py.in
514 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
517 install-data-hook: libglib-gdb.py
518 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
519 $(INSTALL) $(builddir)/libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
520 if HAVE_GLIB_RUNTIME_LIBDIR
521 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
522 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
523 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
524 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
525 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
529 -rm -r $(DESTDIR)$(datadir)/gdb