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
10 -DG_LOG_DOMAIN=\"GLib-GObject\" \
12 -I$(top_srcdir)/glib \
15 -DG_DISABLE_DEPRECATED \
16 -DGOBJECT_COMPILATION \
17 -DG_DISABLE_CONST_RETURNS
19 gobject.def: gobject.symbols
20 (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
22 gobjectalias.h: gobject.symbols
23 $(PERL) $(srcdir)/makegobjectalias.pl < $(srcdir)/gobject.symbols > gobjectalias.h
25 gobjectaliasdef.c: gobject.symbols
26 $(PERL) $(srcdir)/makegobjectalias.pl -def < $(srcdir)/gobject.symbols > gobjectaliasdef.c
29 if HAVE_GNUC_VISIBILITY
30 TESTS = abicheck.sh pltcheck.sh
34 libglib = $(top_builddir)/glib/libglib-2.0.la
36 # libraries to compile and install
37 lib_LTLIBRARIES = libgobject-2.0.la
39 if OS_WIN32_AND_DLL_COMPILATION
41 noinst_DATA = gobject-2.0.lib
43 install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
44 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
52 $(uninstall_ms_lib_cmd)
55 no_undefined = -no-undefined
58 if OS_WIN32_AND_DLL_COMPILATION
59 export_symbols = -export-symbols gobject.def
60 gobject_def = gobject.def
62 gobject_win32_res = gobject-win32-res.o
63 gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
66 $(INSTALL) gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
69 -rm $(DESTDIR)$(libdir)/gobject-2.0.def
74 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
77 # libtool stuff: set version and export symbols for resolving
78 libgobjectincludedir = $(includedir)/glib-2.0/gobject
79 libgobject_2_0_la_LDFLAGS = \
80 $(gobject_win32_res_ldflag) \
81 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
82 -export-dynamic $(no_undefined) $(export_symbols)
84 libgobject_2_0_la_LIBADD = $(libglib)
86 libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) $(gobject_def)
89 # setup source file variables
91 # GObject library header files for public installation
92 gobject_public_h_sources = \
108 gobjectnotifyqueue.c \
111 # GObject library header files that don't get installed
112 gobject_private_h_sources =
113 # GObject library C sources to build the library from
114 gobject_c_sources = \
131 # these sources (also mentioned above) are generated.
132 BUILT_SOURCES = gmarshal.h gmarshal.c gobjectalias.h gobjectaliasdef.c
134 # non-header sources (headers should be specified in the above variables)
135 # that don't serve as direct make target sources, i.e. they don't have
136 # their own .lo rules and don't get publically installed
137 gobject_extra_sources = \
144 # setup GObject library sources and their dependancies
146 gobject_target_headers = $(gobject_public_h_sources)
147 gobject_target_sources = $(gobject_c_sources)
150 $(gobject_private_h_sources) \
151 $(gobject_extra_sources) \
152 makegobjectalias.pl \
153 marshal-genstrings.pl
156 # rules to generate built sources
158 # setup autogeneration dependancies
159 gen_sources = xgen-gmh xgen-gmc xgen-gms
160 CLEANFILES = $(gen_sources)
162 # normal autogeneration rules
163 # all autogenerated files need to be generated in the srcdir,
164 # so old versions get remade and are not confused with newer
165 # versions in the build dir. thus a development setup requires
166 # srcdir to be writable, passing --disable-rebuilds to
167 # ../configure will supress all autogeneration rules.
170 glib_genmarshal=$(GLIB_GENMARSHAL)
172 glib_genmarshal=./glib-genmarshal
175 gmarshal.h: stamp-gmarshal.h
177 stamp-gmarshal.h: @REBUILD@ gmarshal.list glib-genmarshal$(EXEEXT)
178 $(MAKE) glib-genmarshal$(EXEEXT)
179 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
180 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
181 && $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
182 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
183 && (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \
184 && rm -f xgen-gmh xgen-gmh~ \
185 && echo timestamp > $@
187 gmarshal.c: @REBUILD@ stamp-gmarshal.h
188 $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
189 && cp xgen-gmc gmarshal.c \
190 && rm -f xgen-gmc xgen-gmc~
192 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
193 grep '^[A-Z]' $(srcdir)/gmarshal.list \
194 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
195 && cp xgen-gms gmarshal.strings \
196 && rm -f xgen-gms xgen-gms~
198 glib-genmarshal.o: gmarshal.strings
199 gsignal.lo: gmarshal.c
203 libgobjectinclude_HEADERS = $(gobject_target_headers)
204 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
207 # programs to compile and install
209 bin_PROGRAMS = gobject-query glib-genmarshal
210 bin_SCRIPTS = glib-mkenums
211 noinst_PROGRAMS = testgobject
213 gobject_query_SOURCES = gobject-query.c
214 glib_genmarshal_SOURCES = glib-genmarshal.c
215 testgobject_SOURCES = testgobject.c
216 # link programs against libgobject
217 progs_LDADD = ./libgobject-2.0.la $(libglib)
218 glib_genmarshal_LDADD = $(libglib)
219 gobject_query_LDADD = $(progs_LDADD)
220 testgobject_LDADD = $(progs_LDADD)
243 gobject-win32-res.o: gobject.rc
244 $(WINDRES) gobject.rc $@
246 gobject-2.0.lib: libgobject-2.0.la gobject.def
247 lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
249 dist-hook: $(BUILT_EXTRA_DIST)
250 files='$(BUILT_EXTRA_DIST)'; \
251 for f in $$files; do \
252 if test -f $$f; then d=.; else d=$(srcdir); fi; \
253 cp $$d/$$f $(distdir) || exit 1; done
255 install-data-local: install-ms-lib install-def-file
257 uninstall-local: uninstall-ms-lib uninstall-def-file
260 if test $(srcdir) = .; then :; else \
261 rm -f $(BUILT_EXTRA_DIST); \