X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gobject%2FMakefile.am;h=c683e8413d4400dcb578bfd6486f368058e48864;hb=49cc207e35ef6b6ce7f4954a4c067ab43145f6bf;hp=a9bc8a0dc725785a6cfdbecdd79d6635ae0051b2;hpb=b3b7ea8e227035ae27d6ac62595478d27b8152e8;p=platform%2Fupstream%2Fglib.git diff --git a/gobject/Makefile.am b/gobject/Makefile.am index a9bc8a0..c683e84 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -2,42 +2,26 @@ # 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 = . tests -CLEANFILES= - -if HAVE_THREADS -THREAD_FLAGS=-DG_THREADS_MANDATORY -endif - AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"GLib-GObject\" \ - $(gthread_INCLUDES) \ + $(glib_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ - $(THREAD_FLAGS) \ - -DG_DISABLE_DEPRECATED \ - -DGOBJECT_COMPILATION \ - -DG_DISABLE_CONST_RETURNS + -DGOBJECT_COMPILATION -gobject.def: gobject.symbols - $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gobject.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gobject.def +AM_CFLAGS = $(GLIB_WARN_CFLAGS) -if OS_LINUX -if HAVE_GNUC_VISIBILITY -TESTS = abicheck.sh -endif -endif - -libglib = $(top_builddir)/glib/libglib-2.0.la $(top_builddir)/gthread/libgthread-2.0.la +libglib = $(top_builddir)/glib/libglib-2.0.la # libraries to compile and install lib_LTLIBRARIES = libgobject-2.0.la 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 @@ -55,44 +39,33 @@ no_undefined = -no-undefined endif if OS_WIN32_AND_DLL_COMPILATION -export_symbols = -export-symbols gobject.def -gobject_def = gobject.def - gobject_win32_res = gobject-win32-res.o gobject_win32_res_ldflag = -Wl,$(gobject_win32_res) - -install-def-file: - $(INSTALL) gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def - -uninstall-def-file: - -rm $(DESTDIR)$(libdir)/gobject-2.0.def -else -install-def-file: -uninstall-def-file: - -export_symbols = $(LIBTOOL_EXPORT_OPTIONS) endif -# libtool stuff: set version and export symbols for resolving libgobjectincludedir = $(includedir)/glib-2.0/gobject libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \ $(gobject_win32_res_ldflag) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -export-dynamic $(no_undefined) $(export_symbols) + -export-dynamic $(no_undefined) + +libgobject_2_0_la_CFLAGS = $(AM_CFLAGS) $(LIBFFI_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) -libgobject_2_0_la_LIBADD = $(libglib) +libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS) -libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) $(gobject_def) +libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) # # setup source file variables # # GObject library header files for public installation gobject_public_h_sources = \ + glib-types.h \ gbinding.h \ gboxed.h \ gclosure.h \ genums.h \ + gmarshal.h \ gobject.h \ gparam.h \ gparamspecs.h \ @@ -105,8 +78,7 @@ gobject_public_h_sources = \ gvaluearray.h \ gvaluecollector.h \ gvaluetypes.h \ - gobjectnotifyqueue.c \ - gmarshal.h + gobjectnotifyqueue.c # GObject library header files that don't get installed gobject_private_h_sources = \ @@ -121,6 +93,7 @@ gobject_c_sources = \ gboxed.c \ gclosure.c \ genums.c \ + gmarshal.c \ gobject.c \ gobject_trace.h \ gparam.c \ @@ -135,18 +108,20 @@ gobject_c_sources = \ gvaluetransform.c \ gvaluetypes.c -# these sources (also mentioned above) are generated. -BUILT_SOURCES = gmarshal.h gmarshal.c - if ENABLE_DTRACE -gobject_probes.h: gobject_probes.d Makefile - $(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 - $(DTRACE) -G -s $< -o $@ -BUILT_SOURCES += gobject_probes.h gobject_probes.o +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.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 @@ -161,8 +136,7 @@ endif # their own .lo rules and don't get publically installed gobject_extra_sources = \ gmarshal.list \ - gmarshal.strings \ - gobject.symbols + gmarshal.strings # @@ -176,6 +150,14 @@ EXTRA_DIST += \ $(gobject_extra_sources) \ marshal-genstrings.pl +# This is read by gobject-introspection/misc/ and gtk-doc +gobject-public-headers.txt: Makefile + $(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@ + +CLEANFILES += gobject-public-headers.txt + +all-local: gobject-public-headers.txt + # # rules to generate built sources # @@ -190,37 +172,14 @@ CLEANFILES += $(gen_sources) # srcdir to be writable, passing --disable-rebuilds to # ../configure will supress all autogeneration rules. -if CROSS_COMPILING - glib_genmarshal=$(GLIB_GENMARSHAL) -else - glib_genmarshal=./glib-genmarshal -endif - -gmarshal.h: stamp-gmarshal.h - @true -stamp-gmarshal.h: @REBUILD@ gmarshal.list glib-genmarshal$(EXEEXT) - $(MAKE) glib-genmarshal$(EXEEXT) - $(AM_V_GEN) echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \ - && echo "#define __G_MARSHAL_H__" >> xgen-gmh \ - && $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \ - && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \ - && (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \ - && rm -f xgen-gmh xgen-gmh~ \ - && echo timestamp > $@ - -gmarshal.c: @REBUILD@ stamp-gmarshal.h - $(AM_V_GEN) $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \ - && cp xgen-gmc gmarshal.c \ - && rm -f xgen-gmc xgen-gmc~ gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list $(AM_V_GEN) grep '^[A-Z]' $(srcdir)/gmarshal.list \ - | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \ + | $(SED) -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \ && cp xgen-gms gmarshal.strings \ && rm -f xgen-gms xgen-gms~ glib-genmarshal.o: gmarshal.strings -gsignal.lo: gmarshal.c # target platform: libgobjectinclude_HEADERS = $(gobject_target_headers) @@ -231,16 +190,13 @@ libgobject_2_0_la_SOURCES = $(gobject_target_sources) # bin_PROGRAMS = gobject-query glib-genmarshal bin_SCRIPTS = glib-mkenums -noinst_PROGRAMS = testgobject # source files gobject_query_SOURCES = gobject-query.c glib_genmarshal_SOURCES = glib-genmarshal.c -testgobject_SOURCES = testgobject.c # link programs against libgobject progs_LDADD = ./libgobject-2.0.la $(libglib) glib_genmarshal_LDADD = $(libglib) gobject_query_LDADD = $(progs_LDADD) -testgobject_LDADD = $(progs_LDADD) # # auxillary files @@ -249,23 +205,24 @@ EXTRA_DIST += \ makefile.msc.in \ gobject.rc.in \ libgobject-gdb.py.in \ - glib-mkenums.in \ - abicheck.sh + glib-mkenums.in + +CLEANFILES += libgobject-gdb.py -BUILT_EXTRA_DIST = \ +BUILT_EXTRA_DIST += \ makefile.msc \ - gobject.rc \ - gmarshal.h \ - gmarshal.c \ - stamp-gmarshal.h + 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: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 +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)'; \ for f in $$files; do \ if test -f $$f; then d=.; else d=$(srcdir); fi; \ @@ -279,15 +236,35 @@ dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj esac; \ done >libgobject.sourcefiles $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@ + rm libgobject.sourcefiles + +../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin + for F in $(libgobject_2_0_la_SOURCES); do \ + case $$F in \ + *.c) echo ' ' \ + ;; \ + esac; \ + done >libgobject.vs10.sourcefiles + $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@ + rm libgobject.vs10.sourcefiles + +../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin + for F in $(libgobject_2_0_la_SOURCES); do \ + case $$F in \ + *.c) echo ' Source Files' \ + ;; \ + esac; \ + done >libgobject.vs10.sourcefiles.filters + $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@ + rm libgobject.vs10.sourcefiles.filters -install-data-local: install-ms-lib install-def-file +install-data-local: install-ms-lib -uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-gdb +uninstall-local: uninstall-ms-lib uninstall-gdb distclean-local: if test $(srcdir) = .; then :; else \ rm -f $(BUILT_EXTRA_DIST); \ - rm -f libgobject-gdb.py; \ fi # install gdb scripts @@ -295,14 +272,14 @@ gdbdir = $(datadir)/glib-2.0/gdb dist_gdb_SCRIPTS = gobject.py libgobject-gdb.py: libgobject-gdb.py.in - $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > libgobject-gdb.py + $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py uninstall-gdb: -rm -r $(DESTDIR)$(datadir)/gdb install-data-hook: libgobject-gdb.py mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR) - $(INSTALL) libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py + $(INSTALL) $(builddir)/libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py if HAVE_GLIB_RUNTIME_LIBDIR mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR) mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)