1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
9 printf_la = gnulib/libgnulib.la
24 if HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS
25 gatomic_c = gatomic-gcc.c
30 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
32 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
37 -DG_LOG_DOMAIN=\"GLib\" \
39 -DG_DISABLE_DEPRECATED \
43 glib.def: glib.symbols
44 $(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
46 galias.h: $(srcdir)/makegalias.pl glib.symbols
47 $(AM_V_GEN) $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
49 galiasdef.c: $(srcdir)/makegalias.pl glib.symbols
50 $(AM_V_GEN) $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
53 if HAVE_GNUC_VISIBILITY
54 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
55 TESTS = abicheck.sh pltcheck.sh
59 BUILT_SOURCES = galias.h galiasdef.c
61 MIRRORING_TAB_SOURCE = \
62 glib-mirroring-tab/Makefile \
63 glib-mirroring-tab/gen-mirroring-tab.c \
64 glib-mirroring-tab/packtab.h \
65 glib-mirroring-tab/packtab.c
67 # The compilation of GRegex can be disabled, but the source files must
72 gen-unicode-tables.pl \
82 $(MIRRORING_TAB_SOURCE)
84 # 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 libglib_2_0_la_SOURCES = \
185 gvariant-internal.h \
187 gvariant-serialiser.h \
188 gvariant-serialiser.c \
197 EXTRA_libglib_2_0_la_SOURCES = \
204 glibincludedir=$(includedir)/glib-2.0
205 glibinclude_HEADERS = \
209 glibsubincludedir=$(includedir)/glib-2.0/glib
210 glibsubinclude_HEADERS = \
276 install-data-local: install-ms-lib install-def-file
277 @if test -f $(glibincludedir)/glist.h ; then \
278 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
279 echo "*** contents of this directory and type 'make install' again." ; \
283 uninstall-local: uninstall-ms-lib uninstall-def-file
286 no_undefined = -no-undefined
289 if OS_WIN32_AND_DLL_COMPILATION
290 export_symbols = -export-symbols glib.def
292 glib_win32_res = glib-win32-res.o
293 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
298 $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
301 -rm $(DESTDIR)$(libdir)/glib-2.0.def
306 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
311 pcre_lib = $(PCRE_LIBS)
312 pcre_inc = $(PCRE_CFLAGS)
314 pcre_lib = pcre/libpcre.la
322 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
323 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
325 libglib_2_0_la_LDFLAGS = \
326 $(glib_win32_res_ldflag) \
327 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
328 -export-dynamic $(no_undefined) $(export_symbols)
334 glib_probes.h: glib_probes.d Makefile
335 $(DTRACE) -C -h -s $< -o $@.tmp
336 sed -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
337 glib_probes.o: glib_probes.d Makefile
338 $(DTRACE) -G -s $< -o $@
339 BUILT_SOURCES += glib_probes.h glib_probes.o
340 CLEANFILES += glib_probes.h glib_probes.h.tmp
341 libglib_2_0_la_LIBADD += glib_probes.o
345 tapset_in_files = glib.stp.in
346 tapsetdir = $(DESTDIR)@ABS_TAPSET_DIR@
347 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
348 EXTRA_DIST += $(tapset_in_files)
351 gspawn-win32-helper-console.c:
352 echo '#define HELPER_CONSOLE' >$@
353 echo '#include "gspawn-win32-helper.c"' >>$@
355 gspawn-win64-helper.c:
356 echo '#include "gspawn-win32-helper.c"' >$@
358 gspawn-win64-helper-console.c:
359 echo '#define HELPER_CONSOLE' >$@
360 echo '#include "gspawn-win32-helper.c"' >>$@
364 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
365 gspawn_win64_helper_LDADD = libglib-2.0.la
366 gspawn_win64_helper_LDFLAGS = -mwindows
367 gspawn_win64_helper_console_LDADD = libglib-2.0.la
369 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
370 gspawn_win32_helper_LDADD = libglib-2.0.la
371 gspawn_win32_helper_LDFLAGS = -mwindows
372 gspawn_win32_helper_console_LDADD = libglib-2.0.la
376 glib-win32-res.o: glib.rc
377 $(WINDRES) glib.rc $@
379 bin_PROGRAMS = ${INSTALL_PROGS}
383 INSTALL_PROGS += gtester
384 gtester_SOURCES = gtester.c
385 gtester_LDADD = libglib-2.0.la
387 auto_config_binscripts = gtester-report
388 bin_SCRIPTS = ${auto_config_binscripts}
389 EXTRA_DIST += ${auto_config_binscripts}
392 "bindir" : "${bindir}", \
393 "glib-version" : "${GLIB_VERSION}"
396 for sf in ${auto_config_binscripts} ; do \
397 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
398 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
399 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
400 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
402 chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
403 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
408 glib-2.0.lib: libglib-2.0.la glib.def
409 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
411 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj
412 files='$(BUILT_EXTRA_DIST)'; \
413 for f in $$files; do \
414 if test -f $$f; then d=.; else d=$(srcdir); fi; \
415 cp $$d/$$f $(distdir) || exit 1; done
417 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
418 for F in $(libglib_2_0_la_SOURCES); do \
422 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
425 done >libglib.sourcefiles
426 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
429 if test $(srcdir) = .; then :; else \
430 rm -f libglib-gdb.py; \
433 # install gdb scripts
434 gdbdir = $(datadir)/glib-2.0/gdb
435 dist_gdb_SCRIPTS = glib.py
437 libglib-gdb.py: libglib-gdb.py.in
438 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py
441 install-data-hook: libglib-gdb.py
442 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
443 $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
444 if HAVE_GLIB_RUNTIME_LIBDIR
445 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
446 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
447 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
448 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
449 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so