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 . tests
40 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
45 -DG_LOG_DOMAIN=\"GLib\" \
50 glib.def: glib.symbols
51 $(AM_V_GEN) (echo EXPORTS; $(CPP) -P -DG_OS_WIN32 - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /') > $(builddir)/glib.def
54 if HAVE_GNUC_VISIBILITY
55 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
60 MIRRORING_TAB_SOURCE = \
61 glib-mirroring-tab/Makefile \
62 glib-mirroring-tab/gen-mirroring-tab.c \
63 glib-mirroring-tab/packtab.h \
64 glib-mirroring-tab/packtab.c
66 # The compilation of GRegex can be disabled, but the source files must
72 gen-unicode-tables.pl \
74 glibconfig.h.win32.in \
83 $(MIRRORING_TAB_SOURCE)
85 # These may be in the builddir too
91 lib_LTLIBRARIES = libglib-2.0.la
93 if OS_WIN32_AND_DLL_COMPILATION
95 noinst_DATA = glib-2.0.lib
97 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
98 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
103 $(install_ms_lib_cmd)
106 $(uninstall_ms_lib_cmd)
108 deprecated_sources = \
109 deprecated/gallocator.c \
110 deprecated/gcache.c \
111 deprecated/gcompletion.c \
113 deprecated/gthread-deprecated.c
115 libglib_2_0_la_SOURCES = \
116 $(deprecated_sources) \
120 gasyncqueueprivate.h \
204 gvariant-internal.h \
206 gvariant-serialiser.h \
207 gvariant-serialiser.c \
218 libglib_2_0_la_SOURCES += glib-unix.c
222 libglib_2_0_la_SOURCES += gthread-win32.c
224 libglib_2_0_la_SOURCES += gthread-posix.c
227 EXTRA_libglib_2_0_la_SOURCES = \
234 glibincludedir=$(includedir)/glib-2.0
235 glibinclude_HEADERS = \
240 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
241 deprecatedinclude_HEADERS = \
242 deprecated/gallocator.h \
243 deprecated/gcache.h \
244 deprecated/gcompletion.h \
249 glibsubincludedir=$(includedir)/glib-2.0/glib
250 glibsubinclude_HEADERS = \
324 # This is read by gobject-introspection/misc/ and gtk-doc
325 glib-public-headers.txt: Makefile
326 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
328 CLEANFILES += glib-public-headers.txt
330 all-local: glib-public-headers.txt
332 install-data-local: install-ms-lib install-def-file
333 @if test -f $(glibincludedir)/glist.h ; then \
334 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
335 echo "*** contents of this directory and type 'make install' again." ; \
339 uninstall-local: uninstall-ms-lib uninstall-def-file
342 no_undefined = -no-undefined
345 if OS_WIN32_AND_DLL_COMPILATION
346 export_symbols = -export-symbols $(builddir)/glib.def
348 glib_win32_res = glib-win32-res.o
349 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
354 $(INSTALL) $(builddir)/glib.def $(DESTDIR)$(libdir)/glib-2.0.def
357 -rm $(DESTDIR)$(libdir)/glib-2.0.def
362 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
366 pcre_lib = $(PCRE_LIBS)
367 pcre_inc = $(PCRE_CFLAGS)
369 pcre_lib = pcre/libpcre.la
373 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)
374 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
376 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
377 $(glib_win32_res_ldflag) \
378 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
379 -export-dynamic $(no_undefined) $(export_symbols)
384 glib_probes.h: glib_probes.d Makefile
385 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
386 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
387 glib_probes.o: glib_probes.d Makefile
388 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
389 BUILT_SOURCES += glib_probes.h glib_probes.o
390 CLEANFILES += glib_probes.h glib_probes.h.tmp
391 libglib_2_0_la_LIBADD += glib_probes.o
395 tapset_in_files = glib.stp.in
396 tapsetdir = @ABS_TAPSET_DIR@
397 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
398 EXTRA_DIST += $(tapset_in_files)
401 gspawn-win32-helper-console.c:
402 echo '#define HELPER_CONSOLE' >$@
403 echo '#include "gspawn-win32-helper.c"' >>$@
405 gspawn-win64-helper.c:
406 echo '#include "gspawn-win32-helper.c"' >$@
408 gspawn-win64-helper-console.c:
409 echo '#define HELPER_CONSOLE' >$@
410 echo '#include "gspawn-win32-helper.c"' >>$@
415 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
416 gspawn_win64_helper_LDADD = libglib-2.0.la
417 gspawn_win64_helper_LDFLAGS = -mwindows
418 gspawn_win64_helper_console_LDADD = libglib-2.0.la
420 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
421 gspawn_win32_helper_LDADD = libglib-2.0.la
422 gspawn_win32_helper_LDFLAGS = -mwindows
423 gspawn_win32_helper_console_LDADD = libglib-2.0.la
427 glib-win32-res.o: glib.rc
428 $(WINDRES) glib.rc $@
430 bin_PROGRAMS = ${INSTALL_PROGS}
434 INSTALL_PROGS += gtester
435 gtester_SOURCES = gtester.c
436 gtester_LDADD = libglib-2.0.la
438 auto_config_binscripts = gtester-report
439 bin_SCRIPTS = ${auto_config_binscripts}
440 EXTRA_DIST += ${auto_config_binscripts}
443 "bindir" : "${bindir}", \
444 "glib-version" : "${GLIB_VERSION}"
447 for sf in ${auto_config_binscripts} ; do \
448 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
449 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
450 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
451 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
453 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
454 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
459 glib-2.0.lib: libglib-2.0.la glib.def
460 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/glib.def -out:$@
462 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
463 files='$(BUILT_EXTRA_DIST)'; \
464 for f in $$files; do \
465 if test -f $$f; then d=.; else d=$(srcdir); fi; \
466 cp $$d/$$f $(distdir) || exit 1; done
468 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
469 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
471 *-unix.c|gthread-*.c) \
473 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
476 done >libglib.sourcefiles
477 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
478 rm libglib.sourcefiles
480 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
481 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
483 *-unix.c|gthread-*.c) \
485 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
488 done >libglib.vs10.sourcefiles
489 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
490 rm libglib.vs10.sourcefiles
492 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
493 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
495 *-unix.c|gthread-*.c) \
497 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
500 done >libglib.vs10.sourcefiles.filters
501 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
502 rm libglib.vs10.sourcefiles.filters
504 # install gdb scripts
505 gdbdir = $(datadir)/glib-2.0/gdb
506 dist_gdb_SCRIPTS = glib.py
508 libglib-gdb.py: libglib-gdb.py.in
509 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
512 install-data-hook: libglib-gdb.py
513 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
514 $(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
515 if HAVE_GLIB_RUNTIME_LIBDIR
516 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
517 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
518 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
519 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
520 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so