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
58 gen-unicode-tables.pl \
59 glibconfig.h.win32.in \
66 $(MIRRORING_TAB_SOURCE)
68 CLEANFILES += libglib-gdb.py
70 # 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 \
194 gvariant-internal.h \
196 gvariant-serialiser.h \
197 gvariant-serialiser.c \
211 libglib_2_0_la_SOURCES += glib-unix.c
215 libglib_2_0_la_SOURCES += gthread-win32.c
218 libglib_2_0_la_SOURCES += gthread-posix.c
222 EXTRA_libglib_2_0_la_SOURCES = \
229 glibincludedir=$(includedir)/glib-2.0
230 glibinclude_HEADERS = \
235 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
236 deprecatedinclude_HEADERS = \
237 deprecated/gallocator.h \
238 deprecated/gcache.h \
239 deprecated/gcompletion.h \
244 glibsubincludedir=$(includedir)/glib-2.0/glib
245 glibsubinclude_HEADERS = \
319 # This is read by gobject-introspection/misc/ and gtk-doc
320 glib-public-headers.txt: Makefile
321 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
323 CLEANFILES += glib-public-headers.txt
325 all-local: glib-public-headers.txt
327 install-data-local: install-ms-lib
328 @if test -f $(glibincludedir)/glist.h ; then \
329 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
330 echo "*** contents of this directory and type 'make install' again." ; \
334 uninstall-local: uninstall-ms-lib uninstall-gdb
337 no_undefined = -no-undefined
340 if OS_WIN32_AND_DLL_COMPILATION
341 glib_win32_res = glib-win32-res.o
342 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
346 pcre_lib = $(PCRE_LIBS)
347 pcre_inc = $(PCRE_CFLAGS)
349 pcre_lib = pcre/libpcre.la
353 libglib_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
354 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)
355 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
357 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
358 $(glib_win32_res_ldflag) \
359 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
360 -export-dynamic $(no_undefined)
365 DTCOMPILE = $(patsubst -W%,,$(LTCOMPILE))
366 DTCFLAGS = $(patsubst -W%,,$(CFLAGS))
368 glib_probes.h: glib_probes.d
369 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
370 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
372 glib_probes.lo: glib_probes.d
373 $(AM_V_GEN) env CC="$(DTCOMPILE)" CFLAGS="$(DTCFLAGS)" $(DTRACE) -G -s $< -o $@
375 BUILT_SOURCES += glib_probes.h glib_probes.lo
376 CLEANFILES += glib_probes.h glib_probes.h.tmp
377 libglib_2_0_la_LIBADD += glib_probes.lo
381 tapset_in_files = glib.stp.in
382 tapsetdir = @ABS_TAPSET_DIR@
383 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
384 EXTRA_DIST += $(tapset_in_files)
387 gspawn-win32-helper-console.c:
388 echo '#define HELPER_CONSOLE' >$@
389 echo '#include "gspawn-win32-helper.c"' >>$@
391 gspawn-win64-helper.c:
392 echo '#include "gspawn-win32-helper.c"' >$@
394 gspawn-win64-helper-console.c:
395 echo '#define HELPER_CONSOLE' >$@
396 echo '#include "gspawn-win32-helper.c"' >>$@
401 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
402 gspawn_win64_helper_LDADD = libglib-2.0.la
403 gspawn_win64_helper_LDFLAGS = -mwindows
404 gspawn_win64_helper_console_LDADD = libglib-2.0.la
406 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
407 gspawn_win32_helper_LDADD = libglib-2.0.la
408 gspawn_win32_helper_LDFLAGS = -mwindows
409 gspawn_win32_helper_console_LDADD = libglib-2.0.la
413 glib-win32-res.o: glib.rc
414 $(WINDRES) glib.rc $@
416 bin_PROGRAMS = ${INSTALL_PROGS}
420 INSTALL_PROGS += gtester
421 gtester_SOURCES = gtester.c
422 gtester_LDADD = libglib-2.0.la
424 auto_config_binscripts = gtester-report
425 bin_SCRIPTS = ${auto_config_binscripts}
426 EXTRA_DIST += ${auto_config_binscripts}
429 "bindir" : "${bindir}", \
430 "glib-version" : "${GLIB_VERSION}"
433 for sf in ${auto_config_binscripts} ; do \
434 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
435 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
436 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
437 -e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
439 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
440 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
445 glib.def: libglib-2.0.la
446 $(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
448 glib-2.0.lib: libglib-2.0.la glib.def
449 $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
451 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
452 files='$(BUILT_EXTRA_DIST)'; \
453 for f in $$files; do \
454 if test -f $$f; then d=.; else d=$(srcdir); fi; \
455 cp $$d/$$f $(distdir) || exit 1; done
457 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
458 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
460 *-unix.c|gthread-*.c) \
462 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
465 done >libglib.sourcefiles
466 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
467 rm libglib.sourcefiles
469 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
470 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
472 *-unix.c|gthread-*.c) \
474 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
477 done >libglib.vs10.sourcefiles
478 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
479 rm libglib.vs10.sourcefiles
481 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
482 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
484 *-unix.c|gthread-*.c) \
486 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
489 done >libglib.vs10.sourcefiles.filters
490 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
491 rm libglib.vs10.sourcefiles.filters
493 # install gdb scripts
494 gdbdir = $(datadir)/glib-2.0/gdb
495 dist_gdb_SCRIPTS = glib.py
497 libglib-gdb.py: libglib-gdb.py.in
498 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
501 install-data-hook: libglib-gdb.py
502 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
503 $(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
504 if HAVE_GLIB_RUNTIME_LIBDIR
505 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
506 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
507 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
508 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
509 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so
513 -rm -r $(DESTDIR)$(datadir)/gdb