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 = \
63 gobject-autocleanups.h \
84 # GObject library header files that don't get installed
85 gobject_private_h_sources = \
89 # GObject library C sources to build the library from
114 gobject_probes.h: gobject_probes.d
115 $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
117 -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
118 -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
119 < $@.tmp > $@ && rm -f $@.tmp
121 gobject_probes.lo: gobject_probes.d
122 $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
124 BUILT_SOURCES += gobject_probes.h gobject_probes.lo
125 CLEANFILES += gobject_probes.h
126 libgobject_2_0_la_LIBADD += gobject_probes.lo
129 tapsetdir = @ABS_TAPSET_DIR@
130 EXTRA_DIST += gobject.stp.in
133 tapset_DATA = libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@.stp
134 CLEANFILES += $(tapset_DATA)
136 $(tapset_DATA): gobject.stp.in Makefile
138 -e 's|[@]ABS_GLIB_RUNTIME_LIBDIR[@]|$(ABS_GLIB_RUNTIME_LIBDIR)|g' \
139 -e 's|[@]LT_CURRENT[@]|$(LT_CURRENT)|g' \
140 -e 's|[@]LT_REVISION[@]|$(LT_REVISION)|g' \
144 # non-header sources (headers should be specified in the above variables)
145 # that don't serve as direct make target sources, i.e. they don't have
146 # their own .lo rules and don't get publically installed
147 gobject_extra_sources = \
151 # setup GObject library sources and their dependancies
153 gobject_target_headers = $(gobject_public_h_sources)
154 gobject_target_sources = $(gobject_c_sources)
157 $(gobject_private_h_sources) \
158 $(gobject_extra_sources) \
159 marshal-genstrings.pl
161 # This is read by gobject-introspection/misc/ and gtk-doc
162 gobject-public-headers.txt: Makefile
163 $(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
165 CLEANFILES += gobject-public-headers.txt
167 all-local: gobject-public-headers.txt
170 # rules to generate built sources
172 # setup autogeneration dependancies
173 gen_sources = xgen-gmh xgen-gmc xgen-gms
174 CLEANFILES += $(gen_sources)
176 # normal autogeneration rules
177 # all autogenerated files need to be generated in the srcdir,
178 # so old versions get remade and are not confused with newer
179 # versions in the build dir. thus a development setup requires
180 # srcdir to be writable, passing --disable-rebuilds to
181 # ../configure will supress all autogeneration rules.
185 libgobjectinclude_HEADERS = $(gobject_target_headers)
186 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
189 # programs to compile and install
191 bin_PROGRAMS = gobject-query
192 bin_SCRIPTS = glib-mkenums glib-genmarshal
194 gobject_query_SOURCES = gobject-query.c
195 # link programs against libgobject
196 progs_LDADD = ./libgobject-2.0.la $(libglib)
197 gobject_query_LDADD = $(progs_LDADD)
204 libgobject-gdb.py.in \
208 CLEANFILES += libgobject-gdb.py
210 BUILT_EXTRA_DIST += \
213 gobject-win32-res.o: gobject.rc
214 $(AM_V_GEN) $(WINDRES) gobject.rc $@
216 gobject.def: libgobject-2.0.la
217 $(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
219 gobject-2.0.lib: libgobject-2.0.la gobject.def
220 $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
222 # ------ MSVC Project File Generation ------
225 gobject_FILES = $(libgobject_2_0_la_SOURCES)
226 gobject_EXCLUDES = dummy
228 gobject_HEADERS_DIR = $(libgobjectincludedir)
229 gobject_HEADERS_INST = $(gobject_public_h_sources)
230 gobject_HEADERS_EXCLUDES = dummy
232 include $(top_srcdir)/win32/Makefile.msvcproj
234 dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/gobject.vcproj $(top_builddir)/win32/vs9/gobject.headers
235 files='$(BUILT_EXTRA_DIST)'; \
236 for f in $$files; do \
237 if test -f $$f; then d=.; else d=$(srcdir); fi; \
238 cp $$d/$$f $(distdir) || exit 1; done
240 install-data-local: install-ms-lib
242 uninstall-local: uninstall-ms-lib uninstall-gdb
245 if test $(srcdir) = .; then :; else \
246 rm -f $(BUILT_EXTRA_DIST); \
249 # install gdb scripts
250 gdbdir = $(datadir)/glib-2.0/gdb
251 dist_gdb_DATA = gobject_gdb.py
253 libgobject-gdb.py: libgobject-gdb.py.in
254 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
257 -rm -r $(DESTDIR)$(datadir)/gdb
259 if HAVE_GLIB_RUNTIME_LIBDIR
260 ABS_GLIB_RUNTIME_LIBDIR = $(realpath $(libdir)/$(GLIB_RUNTIME_LIBDIR))
262 ABS_GLIB_RUNTIME_LIBDIR = $(libdir)
265 install-data-hook: libgobject-gdb.py
266 mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
267 $(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
268 if HAVE_GLIB_RUNTIME_LIBDIR
269 mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
270 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
271 mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
272 rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
273 ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so