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 if HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS
46 gatomic_c = gatomic-gcc.c
51 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
53 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
58 -DG_LOG_DOMAIN=\"GLib\" \
60 -DG_DISABLE_DEPRECATED \
64 glib.def: glib.symbols
65 $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > glib.def
68 if HAVE_GNUC_VISIBILITY
69 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
74 MIRRORING_TAB_SOURCE = \
75 glib-mirroring-tab/Makefile \
76 glib-mirroring-tab/gen-mirroring-tab.c \
77 glib-mirroring-tab/packtab.h \
78 glib-mirroring-tab/packtab.c
80 # The compilation of GRegex can be disabled, but the source files must
85 gen-unicode-tables.pl \
87 glibconfig.h.win32.in \
94 $(MIRRORING_TAB_SOURCE)
96 # These may be in the builddir too
102 lib_LTLIBRARIES = libglib-2.0.la
104 if OS_WIN32_AND_DLL_COMPILATION
106 noinst_DATA = glib-2.0.lib
108 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
109 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
114 $(install_ms_lib_cmd)
117 $(uninstall_ms_lib_cmd)
119 libglib_2_0_la_SOURCES = \
197 gvariant-internal.h \
199 gvariant-serialiser.h \
200 gvariant-serialiser.c \
209 EXTRA_libglib_2_0_la_SOURCES = \
216 glibincludedir=$(includedir)/glib-2.0
217 glibinclude_HEADERS = \
221 glibsubincludedir=$(includedir)/glib-2.0/glib
222 glibsubinclude_HEADERS = \
289 install-data-local: install-ms-lib install-def-file
290 @if test -f $(glibincludedir)/glist.h ; then \
291 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
292 echo "*** contents of this directory and type 'make install' again." ; \
296 uninstall-local: uninstall-ms-lib uninstall-def-file
299 no_undefined = -no-undefined
302 if OS_WIN32_AND_DLL_COMPILATION
303 export_symbols = -export-symbols glib.def
305 glib_win32_res = glib-win32-res.o
306 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
311 $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
314 -rm $(DESTDIR)$(libdir)/glib-2.0.def
319 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
324 pcre_lib = $(PCRE_LIBS)
325 pcre_inc = $(PCRE_CFLAGS)
327 pcre_lib = pcre/libpcre.la
335 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
336 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
338 libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
339 $(glib_win32_res_ldflag) \
340 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
341 -export-dynamic $(no_undefined) $(export_symbols)
346 glib_probes.h: glib_probes.d Makefile
347 $(DTRACE) -C -h -s $< -o $@.tmp
348 sed -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
349 glib_probes.o: glib_probes.d Makefile
350 $(DTRACE) -G -s $< -o $@
351 BUILT_SOURCES += glib_probes.h glib_probes.o
352 CLEANFILES += glib_probes.h glib_probes.h.tmp
353 libglib_2_0_la_LIBADD += glib_probes.o
357 tapset_in_files = glib.stp.in
358 tapsetdir = @ABS_TAPSET_DIR@
359 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
360 EXTRA_DIST += $(tapset_in_files)
363 gspawn-win32-helper-console.c:
364 echo '#define HELPER_CONSOLE' >$@
365 echo '#include "gspawn-win32-helper.c"' >>$@
367 gspawn-win64-helper.c:
368 echo '#include "gspawn-win32-helper.c"' >$@
370 gspawn-win64-helper-console.c:
371 echo '#define HELPER_CONSOLE' >$@
372 echo '#include "gspawn-win32-helper.c"' >>$@
377 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
378 gspawn_win64_helper_LDADD = libglib-2.0.la
379 gspawn_win64_helper_LDFLAGS = -mwindows
380 gspawn_win64_helper_console_LDADD = libglib-2.0.la
382 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
383 gspawn_win32_helper_LDADD = libglib-2.0.la
384 gspawn_win32_helper_LDFLAGS = -mwindows
385 gspawn_win32_helper_console_LDADD = libglib-2.0.la
389 glib-win32-res.o: glib.rc
390 $(WINDRES) glib.rc $@
392 bin_PROGRAMS = ${INSTALL_PROGS}
396 INSTALL_PROGS += gtester
397 gtester_SOURCES = gtester.c
398 gtester_LDADD = libglib-2.0.la
400 auto_config_binscripts = gtester-report
401 bin_SCRIPTS = ${auto_config_binscripts}
402 EXTRA_DIST += ${auto_config_binscripts}
405 "bindir" : "${bindir}", \
406 "glib-version" : "${GLIB_VERSION}"
409 for sf in ${auto_config_binscripts} ; do \
410 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
411 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
412 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
413 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
415 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
416 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
421 glib-2.0.lib: libglib-2.0.la glib.def
422 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
424 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj
425 files='$(BUILT_EXTRA_DIST)'; \
426 for f in $$files; do \
427 if test -f $$f; then d=.; else d=$(srcdir); fi; \
428 cp $$d/$$f $(distdir) || exit 1; done
430 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
431 for F in $(libglib_2_0_la_SOURCES); do \
435 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
438 done >libglib.sourcefiles
439 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
442 if test $(srcdir) = .; then :; else \
443 rm -f libglib-gdb.py; \
446 # install gdb scripts
447 gdbdir = $(datadir)/glib-2.0/gdb
448 dist_gdb_SCRIPTS = glib.py
450 libglib-gdb.py: libglib-gdb.py.in
451 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py
454 install-data-hook: libglib-gdb.py
455 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
456 $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
457 if HAVE_GLIB_RUNTIME_LIBDIR
458 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
459 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
460 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
461 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
462 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so