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)/glib.mk
10 -DG_LOG_DOMAIN=\"GLib-GObject\" \
15 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
17 libglib = $(top_builddir)/glib/libglib-2.0.la
19 # libraries to compile and install
20 lib_LTLIBRARIES = libgobject-2.0.la
22 if OS_WIN32_AND_DLL_COMPILATION
24 noinst_DATA += gobject-2.0.lib
26 install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
27 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
35 $(uninstall_ms_lib_cmd)
38 no_undefined = -no-undefined
41 if OS_WIN32_AND_DLL_COMPILATION
42 gobject_win32_res = gobject-win32-res.o
43 gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
46 libgobjectincludedir = $(includedir)/glib-2.0/gobject
47 libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
48 $(gobject_win32_res_ldflag) \
49 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
50 -export-dynamic $(no_undefined)
52 libgobject_2_0_la_CFLAGS = $(AM_CFLAGS) $(LIBFFI_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
54 libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS)
56 libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res)
59 # setup source file variables
61 # GObject library header files for public installation
62 gobject_public_h_sources = \
83 # GObject library header files that don't get installed
84 gobject_private_h_sources = \
88 # GObject library C sources to build the library from
112 gobject_probes.h: gobject_probes.d Makefile
113 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
114 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
115 gobject_probes.o: gobject_probes.d Makefile
116 $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
117 BUILT_SOURCES += gobject_probes.h gobject_probes.o
118 CLEANFILES += gobject_probes.h
119 libgobject_2_0_la_LIBADD += gobject_probes.o
123 tapset_in_files = gobject.stp.in
124 tapsetdir = @ABS_TAPSET_DIR@
125 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
126 EXTRA_DIST += $(tapset_in_files)
129 # non-header sources (headers should be specified in the above variables)
130 # that don't serve as direct make target sources, i.e. they don't have
131 # their own .lo rules and don't get publically installed
132 gobject_extra_sources = \
138 # setup GObject library sources and their dependancies
140 gobject_target_headers = $(gobject_public_h_sources)
141 gobject_target_sources = $(gobject_c_sources)
144 $(gobject_private_h_sources) \
145 $(gobject_extra_sources) \
146 marshal-genstrings.pl
148 # This is read by gobject-introspection/misc/ and gtk-doc
149 gobject-public-headers.txt: Makefile
150 $(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
152 CLEANFILES += gobject-public-headers.txt
154 all-local: gobject-public-headers.txt
157 # rules to generate built sources
159 # setup autogeneration dependancies
160 gen_sources = xgen-gmh xgen-gmc xgen-gms
161 CLEANFILES += $(gen_sources)
163 # normal autogeneration rules
164 # all autogenerated files need to be generated in the srcdir,
165 # so old versions get remade and are not confused with newer
166 # versions in the build dir. thus a development setup requires
167 # srcdir to be writable, passing --disable-rebuilds to
168 # ../configure will supress all autogeneration rules.
171 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
172 $(AM_V_GEN) grep '^[A-Z]' $(srcdir)/gmarshal.list \
173 | $(SED) -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
174 && cp xgen-gms gmarshal.strings \
175 && rm -f xgen-gms xgen-gms~
177 glib-genmarshal.o: gmarshal.strings
180 libgobjectinclude_HEADERS = $(gobject_target_headers)
181 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
184 # programs to compile and install
186 bin_PROGRAMS = gobject-query glib-genmarshal
187 bin_SCRIPTS = glib-mkenums
189 gobject_query_SOURCES = gobject-query.c
190 glib_genmarshal_SOURCES = glib-genmarshal.c
191 # link programs against libgobject
192 progs_LDADD = ./libgobject-2.0.la $(libglib)
193 glib_genmarshal_LDADD = $(libglib)
194 gobject_query_LDADD = $(progs_LDADD)
202 libgobject-gdb.py.in \
205 CLEANFILES += libgobject-gdb.py
207 BUILT_EXTRA_DIST += \
211 gobject-win32-res.o: gobject.rc
212 $(AM_V_GEN) $(WINDRES) gobject.rc $@
214 gobject-2.0.lib: libgobject-2.0.la gobject.def
215 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
217 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
218 files='$(BUILT_EXTRA_DIST)'; \
219 for f in $$files; do \
220 if test -f $$f; then d=.; else d=$(srcdir); fi; \
221 cp $$d/$$f $(distdir) || exit 1; done
223 ../build/win32/vs9/gobject.vcproj: $(top_srcdir)/build/win32/vs9/gobject.vcprojin
224 for F in $(libgobject_2_0_la_SOURCES); do \
226 *.c) echo ' <File RelativePath="..\..\..\gobject\'$$F'" />' \
229 done >libgobject.sourcefiles
230 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@
231 rm libgobject.sourcefiles
233 ../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin
234 for F in $(libgobject_2_0_la_SOURCES); do \
236 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'" />' \
239 done >libgobject.vs10.sourcefiles
240 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@
241 rm libgobject.vs10.sourcefiles
243 ../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin
244 for F in $(libgobject_2_0_la_SOURCES); do \
246 *.c) echo ' <ClCompile Include="..\..\..\gobject\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
249 done >libgobject.vs10.sourcefiles.filters
250 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@
251 rm libgobject.vs10.sourcefiles.filters
253 install-data-local: install-ms-lib
255 uninstall-local: uninstall-ms-lib uninstall-gdb
258 if test $(srcdir) = .; then :; else \
259 rm -f $(BUILT_EXTRA_DIST); \
262 # install gdb scripts
263 gdbdir = $(datadir)/glib-2.0/gdb
264 dist_gdb_SCRIPTS = gobject.py
266 libgobject-gdb.py: libgobject-gdb.py.in
267 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
270 -rm -r $(DESTDIR)$(datadir)/gdb
272 install-data-hook: libgobject-gdb.py
273 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
274 $(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
275 if HAVE_GLIB_RUNTIME_LIBDIR
276 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
277 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
278 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
279 rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
280 ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so