# Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc.
#
## Process this file with automake to produce Makefile.in
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-SUBDIRS = .
-if BUILD_MODULAR_TESTS
-SUBDIRS += tests
-endif
-
-BUILT_SOURCES=
-CLEANFILES=
+SUBDIRS = . tests
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GLib-GObject\" \
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
-noinst_DATA = gobject-2.0.lib
+noinst_DATA += gobject-2.0.lib
install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
libgobjectincludedir = $(includedir)/glib-2.0/gobject
libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
+ $(GOBJECT_LINK_FLAGS) \
$(gobject_win32_res_ldflag) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic $(no_undefined)
gvaluetypes.c
if ENABLE_DTRACE
-gobject_probes.h: gobject_probes.d Makefile
+DTCOMPILE = $(patsubst -W%,,$(LTCOMPILE))
+DTCFLAGS = $(patsubst -W%,,$(CFLAGS))
+
+gobject_probes.h: gobject_probes.d
$(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
@$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
-gobject_probes.o: gobject_probes.d Makefile
- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
-BUILT_SOURCES += gobject_probes.h gobject_probes.o
+
+gobject_probes.lo: gobject_probes.d
+ $(AM_V_GEN) env CC="$(DTCOMPILE)" CFLAGS="$(DTCFLAGS)" $(DTRACE) -G -s $< -o $@
+
+BUILT_SOURCES += gobject_probes.h gobject_probes.lo
CLEANFILES += gobject_probes.h
-libgobject_2_0_la_LIBADD += gobject_probes.o
+libgobject_2_0_la_LIBADD += gobject_probes.lo
endif
if ENABLE_SYSTEMTAP
CLEANFILES += libgobject-gdb.py
-BUILT_EXTRA_DIST = \
+BUILT_EXTRA_DIST += \
makefile.msc \
gobject.rc
gobject-win32-res.o: gobject.rc
$(AM_V_GEN) $(WINDRES) gobject.rc $@
+gobject.def: libgobject-2.0.la
+ $(AM_V_GEN) dumpbin.exe -exports .libs/libgobject-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gobject.def.tmp && mv gobject.def.tmp gobject.def
+
gobject-2.0.lib: libgobject-2.0.la gobject.def
- lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
+ $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
files='$(BUILT_EXTRA_DIST)'; \