1 # GObject - GLib Type, Object, Parameter and Signal Library
2 # Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc.
4 ## Process this file with automake to produce Makefile.in
5 include $(top_srcdir)/Makefile.decl
13 -DG_LOG_DOMAIN=\"GLib-GObject\" \
18 gobject.def: gobject.symbols
19 $(AM_V_GEN) (echo 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) > $(builddir)/gobject.def
22 if HAVE_GNUC_VISIBILITY
27 libglib = $(top_builddir)/glib/libglib-2.0.la $(top_builddir)/gthread/libgthread-2.0.la
29 # libraries to compile and install
30 lib_LTLIBRARIES = libgobject-2.0.la
32 if OS_WIN32_AND_DLL_COMPILATION
34 noinst_DATA = gobject-2.0.lib
36 install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
37 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
45 $(uninstall_ms_lib_cmd)
48 no_undefined = -no-undefined
51 if OS_WIN32_AND_DLL_COMPILATION
52 export_symbols = -export-symbols $(builddir)/gobject.def
53 gobject_def = gobject.def
55 gobject_win32_res = gobject-win32-res.o
56 gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
59 $(INSTALL) $(builddir)/gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
62 -rm $(DESTDIR)$(libdir)/gobject-2.0.def
67 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
70 # libtool stuff: set version and export symbols for resolving
71 libgobjectincludedir = $(includedir)/glib-2.0/gobject
72 libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
73 $(gobject_win32_res_ldflag) \
74 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
75 -export-dynamic $(no_undefined) $(export_symbols)
77 libgobject_2_0_la_CFLAGS = $(LIBFFI_CFLAGS)
79 libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS)
81 libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) $(gobject_def)
84 # setup source file variables
86 # GObject library header files for public installation
87 gobject_public_h_sources = \
108 # GObject library header files that don't get installed
109 gobject_private_h_sources = \
113 # GObject library C sources to build the library from
114 gobject_c_sources = \
137 gobject_probes.h: gobject_probes.d Makefile
138 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
139 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
140 gobject_probes.o: gobject_probes.d Makefile
141 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
142 BUILT_SOURCES += gobject_probes.h gobject_probes.o
143 CLEANFILES += gobject_probes.h
144 libgobject_2_0_la_LIBADD += gobject_probes.o
148 tapset_in_files = gobject.stp.in
149 tapsetdir = @ABS_TAPSET_DIR@
150 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
151 EXTRA_DIST += $(tapset_in_files)
154 # non-header sources (headers should be specified in the above variables)
155 # that don't serve as direct make target sources, i.e. they don't have
156 # their own .lo rules and don't get publically installed
157 gobject_extra_sources = \
164 # setup GObject library sources and their dependancies
166 gobject_target_headers = $(gobject_public_h_sources)
167 gobject_target_sources = $(gobject_c_sources)
170 $(gobject_private_h_sources) \
171 $(gobject_extra_sources) \
172 marshal-genstrings.pl
174 # This is read by gobject-introspection/misc/ and gtk-doc
175 gobject-public-headers.txt: Makefile
176 echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
178 CLEANFILES += gobject-public-headers.txt
180 all-local: gobject-public-headers.txt
183 # rules to generate built sources
185 # setup autogeneration dependancies
186 gen_sources = xgen-gmh xgen-gmc xgen-gms
187 CLEANFILES += $(gen_sources)
189 # normal autogeneration rules
190 # all autogenerated files need to be generated in the srcdir,
191 # so old versions get remade and are not confused with newer
192 # versions in the build dir. thus a development setup requires
193 # srcdir to be writable, passing --disable-rebuilds to
194 # ../configure will supress all autogeneration rules.
197 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
198 $(AM_V_GEN) grep '^[A-Z]' $(srcdir)/gmarshal.list \
199 | $(SED) -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
200 && cp xgen-gms gmarshal.strings \
201 && rm -f xgen-gms xgen-gms~
203 glib-genmarshal.o: gmarshal.strings
206 libgobjectinclude_HEADERS = $(gobject_target_headers)
207 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
210 # programs to compile and install
212 bin_PROGRAMS = gobject-query glib-genmarshal
213 bin_SCRIPTS = glib-mkenums
214 noinst_PROGRAMS = testgobject
216 gobject_query_SOURCES = gobject-query.c
217 glib_genmarshal_SOURCES = glib-genmarshal.c
218 testgobject_SOURCES = testgobject.c
219 # link programs against libgobject
220 progs_LDADD = ./libgobject-2.0.la $(libglib)
221 glib_genmarshal_LDADD = $(libglib)
222 gobject_query_LDADD = $(progs_LDADD)
223 testgobject_LDADD = $(progs_LDADD)
231 libgobject-gdb.py.in \
235 CLEANFILES += libgobject-gdb.py
241 gobject-win32-res.o: gobject.rc
242 $(AM_V_GEN) $(WINDRES) gobject.rc $@
244 gobject-2.0.lib: libgobject-2.0.la gobject.def
245 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
247 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
248 files='$(BUILT_EXTRA_DIST)'; \
249 for f in $$files; do \
250 if test -f $$f; then d=.; else d=$(srcdir); fi; \
251 cp $$d/$$f $(distdir) || exit 1; done
253 ../build/win32/vs9/gobject.vcproj: $(top_srcdir)/build/win32/vs9/gobject.vcprojin
254 for F in $(libgobject_2_0_la_SOURCES); do \
256 *.c) echo ' <File RelativePath="..\..\..\gobject\'$$F'" />' \
259 done >libgobject.sourcefiles
260 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@
261 rm libgobject.sourcefiles
263 ../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin
264 for F in $(libgobject_2_0_la_SOURCES); do \
266 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'" />' \
269 done >libgobject.vs10.sourcefiles
270 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@
271 rm libgobject.vs10.sourcefiles
273 ../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin
274 for F in $(libgobject_2_0_la_SOURCES); do \
276 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
279 done >libgobject.vs10.sourcefiles.filters
280 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@
281 rm libgobject.vs10.sourcefiles.filters
283 install-data-local: install-ms-lib install-def-file
285 uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-gdb
288 if test $(srcdir) = .; then :; else \
289 rm -f $(BUILT_EXTRA_DIST); \
292 # install gdb scripts
293 gdbdir = $(datadir)/glib-2.0/gdb
294 dist_gdb_SCRIPTS = gobject.py
296 libgobject-gdb.py: libgobject-gdb.py.in
297 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
300 -rm -r $(DESTDIR)$(datadir)/gdb
302 install-data-hook: libgobject-gdb.py
303 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
304 $(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
305 if HAVE_GLIB_RUNTIME_LIBDIR
306 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
307 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
308 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
309 rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
310 ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so