1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
7 printf_la = gnulib/libgnulib.la
22 if HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS
23 gatomic_c = gatomic-gcc.c
28 SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
30 DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
35 -DG_LOG_DOMAIN=\"GLib\" \
37 -DG_DISABLE_DEPRECATED \
41 glib.def: glib.symbols
42 (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
44 galias.h: $(srcdir)/makegalias.pl glib.symbols
45 $(PERL) $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h
47 galiasdef.c: $(srcdir)/makegalias.pl glib.symbols
48 $(PERL) $(srcdir)/makegalias.pl -def < $(srcdir)/glib.symbols > galiasdef.c
51 if HAVE_GNUC_VISIBILITY
52 TESTS_ENVIRONMENT = GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)"
53 TESTS = abicheck.sh pltcheck.sh
57 BUILT_SOURCES = galias.h galiasdef.c
59 MIRRORING_TAB_SOURCE = \
60 glib-mirroring-tab/Makefile \
61 glib-mirroring-tab/gen-mirroring-tab.c \
62 glib-mirroring-tab/packtab.h \
63 glib-mirroring-tab/packtab.c
65 # The compilation of GRegex can be disabled, but the source files must
70 gen-unicode-tables.pl \
80 $(MIRRORING_TAB_SOURCE)
82 # These may be in the builddir too
89 lib_LTLIBRARIES = libglib-2.0.la
91 if OS_WIN32_AND_DLL_COMPILATION
93 noinst_DATA = glib-2.0.lib
95 install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir)
96 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib
101 $(install_ms_lib_cmd)
104 $(uninstall_ms_lib_cmd)
106 libglib_2_0_la_SOURCES = \
181 gvariant-internal.h \
183 gvariant-serialiser.h \
184 gvariant-serialiser.c \
193 EXTRA_libglib_2_0_la_SOURCES = \
200 glibincludedir=$(includedir)/glib-2.0
201 glibinclude_HEADERS = \
205 glibsubincludedir=$(includedir)/glib-2.0/glib
206 glibsubinclude_HEADERS = \
272 install-data-local: install-ms-lib install-def-file
273 @if test -f $(glibincludedir)/glist.h ; then \
274 echo "*** Old headers found in $(glibincludedir). You should remove the" ; \
275 echo "*** contents of this directory and type 'make install' again." ; \
279 uninstall-local: uninstall-ms-lib uninstall-def-file
282 no_undefined = -no-undefined
285 if OS_WIN32_AND_DLL_COMPILATION
286 export_symbols = -export-symbols glib.def
288 glib_win32_res = glib-win32-res.o
289 glib_win32_res_ldflag = -Wl,$(glib_win32_res)
294 $(INSTALL) glib.def $(DESTDIR)$(libdir)/glib-2.0.def
297 -rm $(DESTDIR)$(libdir)/glib-2.0.def
302 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
307 pcre_lib = $(PCRE_LIBS)
308 pcre_inc = $(PCRE_CFLAGS)
310 pcre_lib = pcre/libpcre.la
318 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
319 libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
321 libglib_2_0_la_LDFLAGS = \
322 $(glib_win32_res_ldflag) \
323 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
324 -export-dynamic $(no_undefined) $(export_symbols)
328 gspawn-win32-helper-console.c:
329 echo '#define HELPER_CONSOLE' >$@
330 echo '#include "gspawn-win32-helper.c"' >>$@
332 gspawn-win64-helper.c:
333 echo '#include "gspawn-win32-helper.c"' >$@
335 gspawn-win64-helper-console.c:
336 echo '#define HELPER_CONSOLE' >$@
337 echo '#include "gspawn-win32-helper.c"' >>$@
341 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
342 gspawn_win64_helper_LDADD = libglib-2.0.la
343 gspawn_win64_helper_LDFLAGS = -mwindows
344 gspawn_win64_helper_console_LDADD = libglib-2.0.la
346 INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
347 gspawn_win32_helper_LDADD = libglib-2.0.la
348 gspawn_win32_helper_LDFLAGS = -mwindows
349 gspawn_win32_helper_console_LDADD = libglib-2.0.la
353 glib-win32-res.o: glib.rc
354 $(WINDRES) glib.rc $@
356 bin_PROGRAMS = ${INSTALL_PROGS}
360 INSTALL_PROGS += gtester
361 gtester_SOURCES = gtester.c
362 gtester_LDADD = libglib-2.0.la
364 auto_config_binscripts = gtester-report
365 bin_SCRIPTS = ${auto_config_binscripts}
366 EXTRA_DIST += ${auto_config_binscripts}
369 "bindir" : "${bindir}", \
370 "glib-version" : "${GLIB_VERSION}"
373 for sf in ${auto_config_binscripts} ; do \
374 mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
375 && sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
376 -e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
377 -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
379 rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
384 glib-2.0.lib: libglib-2.0.la glib.def
385 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libglib-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:glib.def -out:$@
387 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/glib.vcproj
388 files='$(BUILT_EXTRA_DIST)'; \
389 for f in $$files; do \
390 if test -f $$f; then d=.; else d=$(srcdir); fi; \
391 cp $$d/$$f $(distdir) || exit 1; done
393 ../build/win32/vs9/glib.vcproj: $(top_srcdir)/build/win32/vs9/glib.vcprojin
394 for F in $(libglib_2_0_la_SOURCES); do \
398 *.c) echo ' <File RelativePath="..\..\..\glib\'$$F'" />' \
401 done >libglib.sourcefiles
402 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/glib.vcprojin >$@
405 if test $(srcdir) = .; then :; else \
406 rm -f libglib-gdb.py; \
409 # install gdb scripts
410 gdbdir = $(datadir)/glib-2.0/gdb
411 dist_gdb_SCRIPTS = glib.py
413 libglib-gdb.py: libglib-gdb.py.in
414 sed -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > libglib-gdb.py
417 install-data-hook: libglib-gdb.py
418 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)
419 $(INSTALL) libglib-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load$(ABS_GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
420 if HAVE_GLIB_RUNTIME_LIBDIR
421 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
422 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
423 mv $(DESTDIR)$(libdir)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
424 rm -f $(DESTDIR)$(libdir)/libglib-2.0.so
425 ln -s $(GLIB_RUNTIME_LIBDIR)/libglib-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libglib-2.0.so