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
7 -DG_LOG_DOMAIN=\"GLib-GObject\" \
12 -DG_DISABLE_DEPRECATED \
13 -DGOBJECT_COMPILATION \
14 -DG_DISABLE_CONST_RETURNS
16 libglib = $(top_builddir)/glib/libglib-2.0.la
18 # libraries to compile and install
19 lib_LTLIBRARIES = libgobject-2.0.la
22 noinst_DATA = gobject-2.0.lib
25 $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
28 -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
35 no_undefined = -no-undefined
39 export_symbols = -export-symbols $(srcdir)/gobject.def
41 install-libtool-import-lib:
42 $(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir)
43 $(INSTALL) $(srcdir)/gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
45 uninstall-libtool-import-lib:
46 -rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def
48 install-libtool-import-lib:
49 uninstall-libtool-import-lib:
52 # libtool stuff: set version and export symbols for resolving
53 libgobjectincludedir = $(includedir)/glib-2.0/gobject
54 libgobject_2_0_la_LDFLAGS = \
55 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
56 -export-dynamic $(no_undefined) $(export_symbols)
58 libgobject_2_0_la_LIBADD = $(G_OBJECT_WIN32_RESOURCE) $(libglib)
60 libgobject_2_0_la_DEPENDENCIES = $(G_OBJECT_WIN32_RESOURCE) $(GOBJECT_DEF)
63 # setup source file variables
65 # GObject library header files for public installation
66 gobject_public_h_sources = \
82 gobjectnotifyqueue.c \
85 # GObject library header files that don't get installed
86 gobject_private_h_sources =
87 # GObject library C sources to build the library from
105 # these sources (also mentioned above) are generated.
106 BUILT_SOURCES = gmarshal.h gmarshal.c
108 # non-header sources (headers should be specified in the above variables)
109 # that don't serve as direct make target sources, i.e. they don't have
110 # their own .lo rules and don't get publically installed
111 gobject_extra_sources = \
117 # setup GObject library sources and their dependancies
119 gobject_target_headers = $(gobject_public_h_sources)
120 gobject_target_sources = $(gobject_c_sources)
122 EXTRA_DIST = $(gobject_private_h_sources) $(gobject_extra_sources)
125 # rules to generate built sources
127 # setup autogeneration dependancies
128 gen_sources = xgen-gmh xgen-gmc xgen-gms
129 CLEANFILES = $(gen_sources)
131 # normal autogeneration rules
132 # all autogenerated files need to be generated in the srcdir,
133 # so old versions get remade and are not confused with newer
134 # versions in the build dir. thus a development setup requires
135 # srcdir to be writable, passing --disable-rebuilds to
136 # ../configure will supress all autogeneration rules.
139 glib_genmarshal=$(GLIB_GENMARSHAL)
141 glib_genmarshal=./glib-genmarshal
144 gmarshal.h: stamp-gmarshal.h
146 stamp-gmarshal.h: @REBUILD@ gmarshal.list glib-genmarshal$(EXEEXT)
147 $(MAKE) glib-genmarshal$(EXEEXT)
148 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
149 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
150 && $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
151 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
152 && (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \
153 && rm -f xgen-gmh xgen-gmh~ \
154 && echo timestamp > $@
156 gmarshal.c: @REBUILD@ stamp-gmarshal.h
157 $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
158 && cp xgen-gmc gmarshal.c \
159 && rm -f xgen-gmc xgen-gmc~
161 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
162 grep '^[A-Z]' $(srcdir)/gmarshal.list \
163 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
164 && cp xgen-gms gmarshal.strings \
165 && rm -f xgen-gms xgen-gms~
167 glib-genmarshal.o: gmarshal.strings
168 gsignal.lo: gmarshal.c
172 libgobjectinclude_HEADERS = $(gobject_target_headers)
173 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
176 # programs to compile and install
178 bin_PROGRAMS = gobject-query glib-genmarshal
179 bin_SCRIPTS = glib-mkenums
180 noinst_PROGRAMS = testgobject
182 gobject_query_SOURCES = gobject-query.c
183 glib_genmarshal_SOURCES = glib-genmarshal.c
184 testgobject_SOURCES = testgobject.c
185 # link programs against libgobject
186 progs_LDADD = ./libgobject-2.0.la $(libglib)
187 glib_genmarshal_LDADD = $(libglib)
188 gobject_query_LDADD = $(progs_LDADD)
189 testgobject_LDADD = $(progs_LDADD)
212 $(G_OBJECT_WIN32_RESOURCE): gobject.rc
213 $(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
216 gobject-2.0.lib: libgobject-2.0.la gobject.def
217 lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
219 dist-hook: $(BUILT_EXTRA_DIST)
220 files='$(BUILT_EXTRA_DIST)'; \
221 for f in $$files; do \
222 if test -f $$f; then d=.; else d=$(srcdir); fi; \
223 cp $$d/$$f $(distdir) || exit 1; done
225 install-data-local: install-ms-lib install-libtool-import-lib
227 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
230 if test $(srcdir) = .; then :; else \
231 rm -f $(BUILT_EXTRA_DIST); \