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
45 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
47 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
52 -DG_LOG_DOMAIN=\"GLib\" \
54 -DG_DISABLE_DEPRECATED \
58 glib.def: glib.symbols
59 $(AM_V_GEN) (echo EXPORTS; $(CPP) -P -DG_OS_WIN32 - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /') > glib.def
62 if HAVE_GNUC_VISIBILITY
63 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
68 MIRRORING_TAB_SOURCE = \
69 glib-mirroring-tab/Makefile \
70 glib-mirroring-tab/gen-mirroring-tab.c \
71 glib-mirroring-tab/packtab.h \
72 glib-mirroring-tab/packtab.c
74 # The compilation of GRegex can be disabled, but the source files must
80 gen-unicode-tables.pl \
82 glibconfig.h.win32.in \
89 $(MIRRORING_TAB_SOURCE)
91 # These may be in the builddir too
97 lib_LTLIBRARIES = libglib-2.0.la
99 if OS_WIN32_AND_DLL_COMPILATION
101 noinst_DATA = glib-2.0.lib
103 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
104 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
109 $(install_ms_lib_cmd)
112 $(uninstall_ms_lib_cmd)
114 deprecated_sources = \
115 deprecated/gallocator.c \
116 deprecated/gcache.c \
117 deprecated/gcompletion.c \
119 deprecated/gthread-deprecated.c
121 libglib_2_0_la_SOURCES = \
122 $(deprecated_sources) \
126 gasyncqueueprivate.h \
209 gvariant-internal.h \
211 gvariant-serialiser.h \
212 gvariant-serialiser.c \
223 libglib_2_0_la_SOURCES += glib-unix.c
227 libglib_2_0_la_SOURCES += gthread-win32.c
229 libglib_2_0_la_SOURCES += gthread-posix.c
232 EXTRA_libglib_2_0_la_SOURCES = \
239 glibincludedir=$(includedir)/glib-2.0
240 glibinclude_HEADERS = \
245 deprecatedincludedir=$(includedir)/glib-2.0/glib/deprecated
246 deprecatedinclude_HEADERS = \
247 deprecated/gallocator.h \
248 deprecated/gcache.h \
249 deprecated/gcompletion.h \
253 glibsubincludedir=$(includedir)/glib-2.0/glib
254 glibsubinclude_HEADERS = \
325 # This is read by gobject-introspection/misc/ and gtk-doc
326 glib-public-headers.txt: Makefile
327 echo $(glibinclude_HEADERS) $(glibsubinclude_HEADERS) > $@.tmp && mv $@.tmp $@
329 CLEANFILES += glib-public-headers.txt
331 all-local: glib-public-headers.txt
333 install-data-local: install-ms-lib install-def-file
334 @if test -f $(glibincludedir)/glist.h ; then \
335 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
336 echo "*** contents of this directory and type 'make install' again." ; \
340 uninstall-local: uninstall-ms-lib uninstall-def-file
343 no_undefined = -no-undefined
346 if OS_WIN32_AND_DLL_COMPILATION
347 export_symbols = -export-symbols glib.def
349 glib_win32_res = glib-win32-res.o
350 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
355 $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
358 -rm $(DESTDIR)$(libdir)/glib-2.0.def
363 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
368 pcre_lib = $(PCRE_LIBS)
369 pcre_inc = $(PCRE_CFLAGS)
371 pcre_lib = pcre/libpcre.la
379 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) $(GLIB_RT_LIBS) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD)
380 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
382 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
383 $(glib_win32_res_ldflag) \
384 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
385 -export-dynamic $(no_undefined) $(export_symbols)
390 glib_probes.h: glib_probes.d Makefile
391 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
392 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
393 glib_probes.o: glib_probes.d Makefile
394 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
395 BUILT_SOURCES += glib_probes.h glib_probes.o
396 CLEANFILES += glib_probes.h glib_probes.h.tmp
397 libglib_2_0_la_LIBADD += glib_probes.o
401 tapset_in_files = glib.stp.in
402 tapsetdir = @ABS_TAPSET_DIR@
403 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
404 EXTRA_DIST += $(tapset_in_files)
407 gspawn-win32-helper-console.c:
408 echo '#define HELPER_CONSOLE' >$@
409 echo '#include "gspawn-win32-helper.c"' >>$@
411 gspawn-win64-helper.c:
412 echo '#include "gspawn-win32-helper.c"' >$@
414 gspawn-win64-helper-console.c:
415 echo '#define HELPER_CONSOLE' >$@
416 echo '#include "gspawn-win32-helper.c"' >>$@
421 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
422 gspawn_win64_helper_LDADD = libglib-2.0.la
423 gspawn_win64_helper_LDFLAGS = -mwindows
424 gspawn_win64_helper_console_LDADD = libglib-2.0.la
426 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
427 gspawn_win32_helper_LDADD = libglib-2.0.la
428 gspawn_win32_helper_LDFLAGS = -mwindows
429 gspawn_win32_helper_console_LDADD = libglib-2.0.la
433 glib-win32-res.o: glib.rc
434 $(WINDRES) glib.rc $@
436 bin_PROGRAMS = ${INSTALL_PROGS}
440 INSTALL_PROGS += gtester
441 gtester_SOURCES = gtester.c
442 gtester_LDADD = libglib-2.0.la
444 auto_config_binscripts = gtester-report
445 bin_SCRIPTS = ${auto_config_binscripts}
446 EXTRA_DIST += ${auto_config_binscripts}
449 "bindir" : "${bindir}", \
450 "glib-version" : "${GLIB_VERSION}"
453 for sf in ${auto_config_binscripts} ; do \
454 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
455 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
456 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
457 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
459 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
460 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
465 glib-2.0.lib: libglib-2.0.la glib.def
466 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
468 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj ../build/win32/vs10/glib.vcxproj ../build/win32/vs10/glib.vcxproj.filters
469 files='$(BUILT_EXTRA_DIST)'; \
470 for f in $$files; do \
471 if test -f $$f; then d=.; else d=$(srcdir); fi; \
472 cp $$d/$$f $(distdir) || exit 1; done
474 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
475 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
477 *-unix.c|gthread-*.c) \
479 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
482 done >libglib.sourcefiles
483 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
484 rm libglib.sourcefiles
486 ../build/win32/vs10/glib.vcxproj: $(top_srcdir)/build/win32/vs10/glib.vcxprojin
487 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
489 *-unix.c|gthread-*.c) \
491 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'" />' \
494 done >libglib.vs10.sourcefiles
495 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxprojin >$@
496 rm libglib.vs10.sourcefiles
498 ../build/win32/vs10/glib.vcxproj.filters: $(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin
499 for F in `echo $(libglib_2_0_la_SOURCES) | tr '/' '\\'`; do \
501 *-unix.c|gthread-*.c) \
503 *.c) echo ' <ClCompile Include="..\..\..\glib\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
506 done >libglib.vs10.sourcefiles.filters
507 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/glib.vcxproj.filtersin >$@
508 rm libglib.vs10.sourcefiles.filters
511 if test $(srcdir) = .; then :; else \
512 rm -f libglib-gdb.py; \
515 # install gdb scripts
516 gdbdir = $(datadir)/glib-2.0/gdb
517 dist_gdb_SCRIPTS = glib.py
519 libglib-gdb.py: libglib-gdb.py.in
520 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py
523 install-data-hook: libglib-gdb.py
524 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
525 $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
526 if HAVE_GLIB_RUNTIME_LIBDIR
527 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
528 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
529 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
530 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
531 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so