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 glibconfig.h.win32
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 $(AM_V_GEN) cd $(top_builddir) && \
20 $(SHELL) ./config.status glib/glibconfig.h.win32
21 @touch glibconfig-stamp
27 PRINTF_SUBDIR = gnulib
28 printf_la = gnulib/libgnulib.la
36 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
37 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
42 -DG_LOG_DOMAIN=\"GLib\" \
47 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
49 MIRRORING_TAB_SOURCE = \
50 glib-mirroring-tab/Makefile \
51 glib-mirroring-tab/gen-mirroring-tab.c \
52 glib-mirroring-tab/packtab.h \
53 glib-mirroring-tab/packtab.c
55 # The compilation of GRegex can be disabled, but the source files must
59 gen-unicode-tables.pl \
60 glibconfig.h.win32.in \
67 $(MIRRORING_TAB_SOURCE)
69 CLEANFILES += libglib-gdb.py
71 # These may be in the builddir too
76 lib_LTLIBRARIES = libglib-2.0.la
78 if OS_WIN32_AND_DLL_COMPILATION
80 noinst_DATA += glib-2.0.lib
82 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
83 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
91 $(uninstall_ms_lib_cmd)
93 deprecated_sources = \
94 deprecated/gallocator.c \
96 deprecated/gcompletion.c \
98 deprecated/gthread-deprecated.c
100 libglib_2_0_la_SOURCES = \
101 $(deprecated_sources) \
105 gasyncqueueprivate.h \
195 gvariant-internal.h \
197 gvariant-serialiser.h \
198 gvariant-serialiser.c \
210 libglib_2_0_la_SOURCES += glib-unix.c
214 libglib_2_0_la_SOURCES += gthread-win32.c
217 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 = \
245 glib-autocleanups.h \
320 # This is read by gobject-introspection/misc/ and gtk-doc
321 glib-public-headers.txt: Makefile
322 $(AM_V_GEN) echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
324 CLEANFILES += glib-public-headers.txt
326 all-local: glib-public-headers.txt
328 install-data-local: install-ms-lib
329 @if test -f $(glibincludedir)/glist.h ; then \
330 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
331 echo "*** contents of this directory and type 'make install' again." ; \
335 uninstall-local: uninstall-ms-lib uninstall-gdb
338 no_undefined = -no-undefined
341 if OS_WIN32_AND_DLL_COMPILATION
342 glib_win32_res = glib-win32-res.o
343 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
347 pcre_lib = $(PCRE_LIBS)
348 pcre_inc = $(PCRE_CFLAGS)
350 pcre_lib = pcre/libpcre.la
354 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) $(LIBSYSTEMD_CFLAGS)
355 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) $(LIBSYSTEMD_LIBS)
356 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
358 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
359 $(glib_win32_res_ldflag) \
360 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
361 -export-dynamic $(no_undefined)
366 glib_probes.h: glib_probes.d
367 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
369 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
370 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
371 < $@.tmp > $@ && rm -f $@.tmp
373 glib_probes.lo: glib_probes.d
374 $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
376 BUILT_SOURCES += glib_probes.h glib_probes.lo
377 CLEANFILES += glib_probes.h glib_probes.h.tmp
378 libglib_2_0_la_LIBADD += glib_probes.lo
381 tapsetdir = @ABS_TAPSET_DIR@
382 EXTRA_DIST += glib.stp.in
385 tapset_DATA = libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
386 CLEANFILES += $(tapset_DATA)
388 $(tapset_DATA): glib.stp.in Makefile
390 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
391 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
392 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
396 gspawn-win32-helper-console.c:
397 echo '#define HELPER_CONSOLE' >$@
398 echo '#include "gspawn-win32-helper.c"' >>$@
400 gspawn-win64-helper.c:
401 echo '#include "gspawn-win32-helper.c"' >$@
403 gspawn-win64-helper-console.c:
404 echo '#define HELPER_CONSOLE' >$@
405 echo '#include "gspawn-win32-helper.c"' >>$@
410 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
411 gspawn_win64_helper_LDADD = libglib-2.0.la
412 gspawn_win64_helper_LDFLAGS = -mwindows
413 gspawn_win64_helper_console_LDADD = libglib-2.0.la
415 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
416 gspawn_win32_helper_LDADD = libglib-2.0.la
417 gspawn_win32_helper_LDFLAGS = -mwindows
418 gspawn_win32_helper_console_LDADD = libglib-2.0.la
422 glib-win32-res.o: glib.rc
423 $(WINDRES) glib.rc $@
425 bin_PROGRAMS = ${INSTALL_PROGS}
429 INSTALL_PROGS += gtester
430 gtester_SOURCES = gtester.c
431 gtester_LDADD = libglib-2.0.la
433 auto_config_binscripts = gtester-report
434 bin_SCRIPTS = ${auto_config_binscripts}
435 EXTRA_DIST += ${auto_config_binscripts}
438 "bindir" : "${bindir}", \
439 "glib-version" : "${GLIB_VERSION}"
442 for sf in ${auto_config_binscripts} ; do \
443 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
444 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
445 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
446 -e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
448 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
449 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
454 glib.def: libglib-2.0.la
455 $(AM_V_GEN) dumpbin.exe -exports .libs/libglib-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > glib.def.tmp && mv glib.def.tmp glib.def
457 glib-2.0.lib: libglib-2.0.la glib.def
458 $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
460 # ------ MSVC Project File Generation ------
463 glib_FILES = $(libglib_2_0_la_SOURCES)
464 glib_EXCLUDES = *-unix.c|gthread-*.c
466 glib_HEADERS_DIR = $(glibsubincludedir)
467 glib_HEADERS_INST = $(deprecatedinclude_HEADERS) $(glibsubinclude_HEADERS)
468 glib_HEADERS_EXCLUDES = dummy
470 include $(top_srcdir)/win32/Makefile.msvcproj
472 dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/glib.vcproj $(top_builddir)/win32/vs9/glib.headers
473 files='$(BUILT_EXTRA_DIST)'; \
474 for f in $$files; do \
475 if test -f $$f; then d=.; else d=$(srcdir); fi; \
476 cp $$d/$$f $(distdir) || exit 1; done
478 # install gdb scripts
479 gdbdir = $(datadir)/glib-2.0/gdb
480 dist_gdb_DATA = glib_gdb.py
482 all-local: libglib-gdb.py
483 libglib-gdb.py: libglib-gdb.py.in
484 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
486 if HAVE_GLIB_RUNTIME_LIBDIR
487 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
489 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
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