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 THREAD_FLAGS=-DG_THREADS_MANDATORY
17 -DG_LOG_DOMAIN=\"GLib-GObject\" \
21 -DG_DISABLE_DEPRECATED \
24 gobject.def: gobject.symbols
25 $(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
28 if HAVE_GNUC_VISIBILITY
33 libglib = $(top_builddir)/glib/libglib-2.0.la $(top_builddir)/gthread/libgthread-2.0.la
35 # libraries to compile and install
36 lib_LTLIBRARIES = libgobject-2.0.la
38 if OS_WIN32_AND_DLL_COMPILATION
40 noinst_DATA = gobject-2.0.lib
42 install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
43 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
51 $(uninstall_ms_lib_cmd)
54 no_undefined = -no-undefined
57 if OS_WIN32_AND_DLL_COMPILATION
58 export_symbols = -export-symbols gobject.def
59 gobject_def = gobject.def
61 gobject_win32_res = gobject-win32-res.o
62 gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
65 $(INSTALL) gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
68 -rm $(DESTDIR)$(libdir)/gobject-2.0.def
73 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
76 # libtool stuff: set version and export symbols for resolving
77 libgobjectincludedir = $(includedir)/glib-2.0/gobject
78 libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
79 $(gobject_win32_res_ldflag) \
80 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
81 -export-dynamic $(no_undefined) $(export_symbols)
83 libgobject_2_0_la_CFLAGS = $(LIBFFI_CFLAGS)
85 libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS)
87 libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) $(gobject_def)
90 # setup source file variables
92 # GObject library header files for public installation
93 gobject_public_h_sources = \
114 # GObject library header files that don't get installed
115 gobject_private_h_sources = \
119 # GObject library C sources to build the library from
120 gobject_c_sources = \
143 gobject_probes.h: gobject_probes.d Makefile
144 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
145 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
146 gobject_probes.o: gobject_probes.d Makefile
147 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
148 BUILT_SOURCES += gobject_probes.h gobject_probes.o
149 CLEANFILES += gobject_probes.h
150 libgobject_2_0_la_LIBADD += gobject_probes.o
154 tapset_in_files = gobject.stp.in
155 tapsetdir = @ABS_TAPSET_DIR@
156 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
157 EXTRA_DIST += $(tapset_in_files)
160 # non-header sources (headers should be specified in the above variables)
161 # that don't serve as direct make target sources, i.e. they don't have
162 # their own .lo rules and don't get publically installed
163 gobject_extra_sources = \
170 # setup GObject library sources and their dependancies
172 gobject_target_headers = $(gobject_public_h_sources)
173 gobject_target_sources = $(gobject_c_sources)
176 $(gobject_private_h_sources) \
177 $(gobject_extra_sources) \
178 marshal-genstrings.pl
180 # This is read by gobject-introspection/misc/ and gtk-doc
181 gobject-public-headers.txt: Makefile
182 echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
184 CLEANFILES += gobject-public-headers.txt
186 all-local: gobject-public-headers.txt
189 # rules to generate built sources
191 # setup autogeneration dependancies
192 gen_sources = xgen-gmh xgen-gmc xgen-gms
193 CLEANFILES += $(gen_sources)
195 # normal autogeneration rules
196 # all autogenerated files need to be generated in the srcdir,
197 # so old versions get remade and are not confused with newer
198 # versions in the build dir. thus a development setup requires
199 # srcdir to be writable, passing --disable-rebuilds to
200 # ../configure will supress all autogeneration rules.
203 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
204 $(AM_V_GEN) grep '^[A-Z]' $(srcdir)/gmarshal.list \
205 | $(SED) -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
206 && cp xgen-gms gmarshal.strings \
207 && rm -f xgen-gms xgen-gms~
209 glib-genmarshal.o: gmarshal.strings
212 libgobjectinclude_HEADERS = $(gobject_target_headers)
213 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
216 # programs to compile and install
218 bin_PROGRAMS = gobject-query glib-genmarshal
219 bin_SCRIPTS = glib-mkenums
220 noinst_PROGRAMS = testgobject
222 gobject_query_SOURCES = gobject-query.c
223 glib_genmarshal_SOURCES = glib-genmarshal.c
224 testgobject_SOURCES = testgobject.c
225 # link programs against libgobject
226 progs_LDADD = ./libgobject-2.0.la $(libglib)
227 glib_genmarshal_LDADD = $(libglib)
228 gobject_query_LDADD = $(progs_LDADD)
229 testgobject_LDADD = $(progs_LDADD)
237 libgobject-gdb.py.in \
245 gobject-win32-res.o: gobject.rc
246 $(AM_V_GEN) $(WINDRES) gobject.rc $@
248 gobject-2.0.lib: libgobject-2.0.la gobject.def
249 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
251 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
252 files='$(BUILT_EXTRA_DIST)'; \
253 for f in $$files; do \
254 if test -f $$f; then d=.; else d=$(srcdir); fi; \
255 cp $$d/$$f $(distdir) || exit 1; done
257 ../build/win32/vs9/gobject.vcproj: $(top_srcdir)/build/win32/vs9/gobject.vcprojin
258 for F in $(libgobject_2_0_la_SOURCES); do \
260 *.c) echo ' <File RelativePath="..\..\..\gobject\'$$F'" />' \
263 done >libgobject.sourcefiles
264 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@
265 rm libgobject.sourcefiles
267 ../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin
268 for F in $(libgobject_2_0_la_SOURCES); do \
270 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'" />' \
273 done >libgobject.vs10.sourcefiles
274 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@
275 rm libgobject.vs10.sourcefiles
277 ../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin
278 for F in $(libgobject_2_0_la_SOURCES); do \
280 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
283 done >libgobject.vs10.sourcefiles.filters
284 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@
285 rm libgobject.vs10.sourcefiles.filters
287 install-data-local: install-ms-lib install-def-file
289 uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-gdb
292 if test $(srcdir) = .; then :; else \
293 rm -f $(BUILT_EXTRA_DIST); \
294 rm -f libgobject-gdb.py; \
297 # install gdb scripts
298 gdbdir = $(datadir)/glib-2.0/gdb
299 dist_gdb_SCRIPTS = gobject.py
301 libgobject-gdb.py: libgobject-gdb.py.in
302 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > libgobject-gdb.py
305 -rm -r $(DESTDIR)$(datadir)/gdb
307 install-data-hook: libgobject-gdb.py
308 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
309 $(INSTALL) libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
310 if HAVE_GLIB_RUNTIME_LIBDIR
311 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
312 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
313 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
314 rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
315 ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so