1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/glib.mk
5 # Generate glibconfig.h
7 # The timestamp of the stamp file is used to indicate if glibconfig.h is
8 # up to date with respect to config.status. In the usual case, changes
9 # to config.status will not result in changes to glibconfig.h so we
10 # avoid touching its timestamp (in order not to rebuild the whole tree).
12 DISTCLEANFILES += glibconfig-stamp glibconfig.h
13 BUILT_SOURCES += glibconfig-stamp
14 configexecincludedir = $(libdir)/glib-2.0/include
15 nodist_configexecinclude_HEADERS = glibconfig.h
16 glibconfig-stamp: ../config.status
17 $(AM_V_GEN) cd $(top_builddir) && \
18 $(SHELL) ./config.status glib/glibconfig.h
19 @touch glibconfig-stamp
25 PRINTF_SUBDIR = gnulib
26 printf_la = gnulib/libgnulib.la
34 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
35 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
40 -DG_LOG_DOMAIN=\"GLib\" \
45 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
47 MIRRORING_TAB_SOURCE = \
48 glib-mirroring-tab/Makefile \
49 glib-mirroring-tab/gen-mirroring-tab.c \
50 glib-mirroring-tab/packtab.h \
51 glib-mirroring-tab/packtab.c
53 # The compilation of GRegex can be disabled, but the source files must
59 gen-unicode-tables.pl \
61 glibconfig.h.win32.in \
68 $(MIRRORING_TAB_SOURCE)
70 CLEANFILES += libglib-gdb.py
72 # These may be in the builddir too
78 lib_LTLIBRARIES = libglib-2.0.la
80 if OS_WIN32_AND_DLL_COMPILATION
82 noinst_DATA += glib-2.0.lib
84 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
85 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
93 $(uninstall_ms_lib_cmd)
95 deprecated_sources = \
96 deprecated/gallocator.c \
98 deprecated/gcompletion.c \
100 deprecated/gthread-deprecated.c
102 libglib_2_0_la_SOURCES = \
103 $(deprecated_sources) \
107 gasyncqueueprivate.h \
193 gvariant-internal.h \
195 gvariant-serialiser.h \
196 gvariant-serialiser.c \
208 libglib_2_0_la_SOURCES += glib-unix.c
212 libglib_2_0_la_SOURCES += gthread-win32.c
215 libglib_2_0_la_SOURCES += gthread-posix.c
219 EXTRA_libglib_2_0_la_SOURCES = \
226 glibincludedir=$(includedir)/glib-2.0
227 glibinclude_HEADERS = \
232 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
233 deprecatedinclude_HEADERS = \
234 deprecated/gallocator.h \
235 deprecated/gcache.h \
236 deprecated/gcompletion.h \
241 glibsubincludedir=$(includedir)/glib-2.0/glib
242 glibsubinclude_HEADERS = \
316 # This is read by gobject-introspection/misc/ and gtk-doc
317 glib-public-headers.txt: Makefile
318 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
320 CLEANFILES += glib-public-headers.txt
322 all-local: glib-public-headers.txt
324 install-data-local: install-ms-lib
325 @if test -f $(glibincludedir)/glist.h ; then \
326 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
327 echo "*** contents of this directory and type 'make install' again." ; \
331 uninstall-local: uninstall-ms-lib uninstall-gdb
334 no_undefined = -no-undefined
337 if OS_WIN32_AND_DLL_COMPILATION
338 glib_win32_res = glib-win32-res.o
339 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
343 pcre_lib = $(PCRE_LIBS)
344 pcre_inc = $(PCRE_CFLAGS)
346 pcre_lib = pcre/libpcre.la
350 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
351 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)
352 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
354 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
355 $(glib_win32_res_ldflag) \
356 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
357 -export-dynamic $(no_undefined)
362 DTCOMPILE = $(patsubst -W%,,$(LTCOMPILE))
363 DTCFLAGS = $(patsubst -W%,,$(CFLAGS))
365 glib_probes.h: glib_probes.d
366 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
367 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
369 glib_probes.lo: glib_probes.d
370 $(AM_V_GEN) env CC="$(DTCOMPILE)" CFLAGS="$(DTCFLAGS)" $(DTRACE) -G -s $< -o $@
372 BUILT_SOURCES += glib_probes.h glib_probes.lo
373 CLEANFILES += glib_probes.h glib_probes.h.tmp
374 libglib_2_0_la_LIBADD += glib_probes.lo
378 tapset_in_files = glib.stp.in
379 tapsetdir = @ABS_TAPSET_DIR@
380 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
381 EXTRA_DIST += $(tapset_in_files)
384 gspawn-win32-helper-console.c:
385 echo '#define HELPER_CONSOLE' >$@
386 echo '#include "gspawn-win32-helper.c"' >>$@
388 gspawn-win64-helper.c:
389 echo '#include "gspawn-win32-helper.c"' >$@
391 gspawn-win64-helper-console.c:
392 echo '#define HELPER_CONSOLE' >$@
393 echo '#include "gspawn-win32-helper.c"' >>$@
398 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
399 gspawn_win64_helper_LDADD = libglib-2.0.la
400 gspawn_win64_helper_LDFLAGS = -mwindows
401 gspawn_win64_helper_console_LDADD = libglib-2.0.la
403 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
404 gspawn_win32_helper_LDADD = libglib-2.0.la
405 gspawn_win32_helper_LDFLAGS = -mwindows
406 gspawn_win32_helper_console_LDADD = libglib-2.0.la
410 glib-win32-res.o: glib.rc
411 $(WINDRES) glib.rc $@
413 bin_PROGRAMS = ${INSTALL_PROGS}
417 INSTALL_PROGS += gtester
418 gtester_SOURCES = gtester.c
419 gtester_LDADD = libglib-2.0.la
421 auto_config_binscripts = gtester-report
422 bin_SCRIPTS = ${auto_config_binscripts}
423 EXTRA_DIST += ${auto_config_binscripts}
426 "bindir" : "${bindir}", \
427 "glib-version" : "${GLIB_VERSION}"
430 for sf in ${auto_config_binscripts} ; do \
431 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
432 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
433 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
434 -e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
436 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
437 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
442 glib-2.0.lib: libglib-2.0.la glib.def
443 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
445 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
446 files='$(BUILT_EXTRA_DIST)'; \
447 for f in $$files; do \
448 if test -f $$f; then d=.; else d=$(srcdir); fi; \
449 cp $$d/$$f $(distdir) || exit 1; done
451 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
452 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
454 *-unix.c|gthread-*.c) \
456 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
459 done >libglib.sourcefiles
460 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
461 rm libglib.sourcefiles
463 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
464 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
466 *-unix.c|gthread-*.c) \
468 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
471 done >libglib.vs10.sourcefiles
472 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
473 rm libglib.vs10.sourcefiles
475 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
476 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
478 *-unix.c|gthread-*.c) \
480 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
483 done >libglib.vs10.sourcefiles.filters
484 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
485 rm libglib.vs10.sourcefiles.filters
487 # install gdb scripts
488 gdbdir = $(datadir)/glib-2.0/gdb
489 dist_gdb_SCRIPTS = glib.py
491 libglib-gdb.py: libglib-gdb.py.in
492 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
495 install-data-hook: libglib-gdb.py
496 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
497 $(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
498 if HAVE_GLIB_RUNTIME_LIBDIR
499 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
500 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
501 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
502 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
503 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
507 -rm -r $(DESTDIR)$(datadir)/gdb