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\" \
52 MIRRORING_TAB_SOURCE = \
53 glib-mirroring-tab/Makefile \
54 glib-mirroring-tab/gen-mirroring-tab.c \
55 glib-mirroring-tab/packtab.h \
56 glib-mirroring-tab/packtab.c
58 # The compilation of GRegex can be disabled, but the source files must
64 gen-unicode-tables.pl \
66 glibconfig.h.win32.in \
73 $(MIRRORING_TAB_SOURCE)
75 CLEANFILES += libglib-gdb.py
77 # These may be in the builddir too
83 lib_LTLIBRARIES = libglib-2.0.la
85 if OS_WIN32_AND_DLL_COMPILATION
87 noinst_DATA = glib-2.0.lib
89 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
90 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
98 $(uninstall_ms_lib_cmd)
100 deprecated_sources = \
101 deprecated/gallocator.c \
102 deprecated/gcache.c \
103 deprecated/gcompletion.c \
105 deprecated/gthread-deprecated.c
107 libglib_2_0_la_SOURCES = \
108 $(deprecated_sources) \
112 gasyncqueueprivate.h \
198 gvariant-internal.h \
200 gvariant-serialiser.h \
201 gvariant-serialiser.c \
212 libglib_2_0_la_SOURCES += glib-unix.c
216 libglib_2_0_la_SOURCES += gthread-win32.c
218 libglib_2_0_la_SOURCES += gthread-posix.c
221 EXTRA_libglib_2_0_la_SOURCES = \
228 glibincludedir=$(includedir)/glib-2.0
229 glibinclude_HEADERS = \
234 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
235 deprecatedinclude_HEADERS = \
236 deprecated/gallocator.h \
237 deprecated/gcache.h \
238 deprecated/gcompletion.h \
243 glibsubincludedir=$(includedir)/glib-2.0/glib
244 glibsubinclude_HEADERS = \
318 # This is read by gobject-introspection/misc/ and gtk-doc
319 glib-public-headers.txt: Makefile
320 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
322 CLEANFILES += glib-public-headers.txt
324 all-local: glib-public-headers.txt
326 install-data-local: install-ms-lib
327 @if test -f $(glibincludedir)/glist.h ; then \
328 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
329 echo "*** contents of this directory and type 'make install' again." ; \
333 uninstall-local: uninstall-ms-lib uninstall-gdb
336 no_undefined = -no-undefined
339 if OS_WIN32_AND_DLL_COMPILATION
340 glib_win32_res = glib-win32-res.o
341 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
345 pcre_lib = $(PCRE_LIBS)
346 pcre_inc = $(PCRE_CFLAGS)
348 pcre_lib = pcre/libpcre.la
352 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
353 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)
354 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
356 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
357 $(glib_win32_res_ldflag) \
358 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
359 -export-dynamic $(no_undefined)
364 glib_probes.h: glib_probes.d Makefile
365 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
366 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
367 glib_probes.o: glib_probes.d Makefile
368 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
369 BUILT_SOURCES += glib_probes.h glib_probes.o
370 CLEANFILES += glib_probes.h glib_probes.h.tmp
371 libglib_2_0_la_LIBADD += glib_probes.o
375 tapset_in_files = glib.stp.in
376 tapsetdir = @ABS_TAPSET_DIR@
377 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
378 EXTRA_DIST += $(tapset_in_files)
381 gspawn-win32-helper-console.c:
382 echo '#define HELPER_CONSOLE' >$@
383 echo '#include "gspawn-win32-helper.c"' >>$@
385 gspawn-win64-helper.c:
386 echo '#include "gspawn-win32-helper.c"' >$@
388 gspawn-win64-helper-console.c:
389 echo '#define HELPER_CONSOLE' >$@
390 echo '#include "gspawn-win32-helper.c"' >>$@
395 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
396 gspawn_win64_helper_LDADD = libglib-2.0.la
397 gspawn_win64_helper_LDFLAGS = -mwindows
398 gspawn_win64_helper_console_LDADD = libglib-2.0.la
400 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
401 gspawn_win32_helper_LDADD = libglib-2.0.la
402 gspawn_win32_helper_LDFLAGS = -mwindows
403 gspawn_win32_helper_console_LDADD = libglib-2.0.la
407 glib-win32-res.o: glib.rc
408 $(WINDRES) glib.rc $@
410 bin_PROGRAMS = ${INSTALL_PROGS}
414 INSTALL_PROGS += gtester
415 gtester_SOURCES = gtester.c
416 gtester_LDADD = libglib-2.0.la
418 auto_config_binscripts = gtester-report
419 bin_SCRIPTS = ${auto_config_binscripts}
420 EXTRA_DIST += ${auto_config_binscripts}
423 "bindir" : "${bindir}", \
424 "glib-version" : "${GLIB_VERSION}"
427 for sf in ${auto_config_binscripts} ; do \
428 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
429 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
430 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
431 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
433 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
434 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
439 glib-2.0.lib: libglib-2.0.la glib.def
440 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
442 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
443 files='$(BUILT_EXTRA_DIST)'; \
444 for f in $$files; do \
445 if test -f $$f; then d=.; else d=$(srcdir); fi; \
446 cp $$d/$$f $(distdir) || exit 1; done
448 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
449 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
451 *-unix.c|gthread-*.c) \
453 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
456 done >libglib.sourcefiles
457 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
458 rm libglib.sourcefiles
460 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
461 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
463 *-unix.c|gthread-*.c) \
465 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
468 done >libglib.vs10.sourcefiles
469 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
470 rm libglib.vs10.sourcefiles
472 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
473 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
475 *-unix.c|gthread-*.c) \
477 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
480 done >libglib.vs10.sourcefiles.filters
481 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
482 rm libglib.vs10.sourcefiles.filters
484 # install gdb scripts
485 gdbdir = $(datadir)/glib-2.0/gdb
486 dist_gdb_SCRIPTS = glib.py
488 libglib-gdb.py: libglib-gdb.py.in
489 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
492 install-data-hook: libglib-gdb.py
493 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
494 $(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
495 if HAVE_GLIB_RUNTIME_LIBDIR
496 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
497 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
498 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
499 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
500 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
504 -rm -r $(DESTDIR)$(datadir)/gdb