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
6 INCLUDES = @STRIP_BEGIN@ \
7 -DG_LOG_DOMAIN=\"GLib-GObject\" \
12 -DG_DISABLE_DEPRECATED \
13 -DGOBJECT_COMPILATION \
14 -DG_DISABLE_CONST_RETURNS \
17 libglib = $(top_builddir)/glib/libglib-2.0.la
19 # libraries to compile and install
20 lib_LTLIBRARIES = libgobject-2.0.la
23 noinst_DATA = gobject-2.0.lib
26 $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
29 -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
36 no_undefined = -no-undefined
40 export_symbols = -export-symbols gobject.def
42 install-libtool-import-lib:
43 $(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir)
44 uninstall-libtool-import-lib:
45 -rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a
47 install-libtool-import-lib:
48 uninstall-libtool-import-lib:
51 # libtool stuff: set version and export symbols for resolving
52 libgobjectincludedir = $(includedir)/glib-2.0/gobject
53 libgobject_2_0_la_LDFLAGS = @STRIP_BEGIN@ \
54 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
55 -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 (non-generated)
66 gobject_public_h_sources = @STRIP_BEGIN@ \
82 gobjectnotifyqueue.c \
84 # GObject library header files that don't get installed
85 gobject_private_h_sources = @STRIP_BEGIN@ \
87 # GObject library C sources to build the library from
88 gobject_c_sources = @STRIP_BEGIN@ \
106 # we use our own built_sources variable rules to avoid automake's
107 # BUILT_SOURCES oddities
108 # we generate frequently rebuild files piggyback on a stamp file, so sources
109 # depending on them only get rebuild when the built source actually changed
112 # built sources that get installed with the header files
113 gobject_built_public_sources = @STRIP_BEGIN@ \
116 # built sources that don't get installed
117 gobject_built_sources = @STRIP_BEGIN@ \
120 ${gobject_built_public_sources} \
122 # non-header sources (headers should be specified in the above variables)
123 # that don't serve as direct make target sources, i.e. they don't have
124 # their own .lo rules and don't get publically installed
125 gobject_extra_sources = @STRIP_BEGIN@ \
132 # setup GObject library sources and their dependancies
134 gobject_target_headers = $(gobject_public_h_sources) $(gobject_built_public_sources)
135 gobject_target_sources = $(gobject_c_sources)
136 MAINTAINERCLEANFILES += $(gobject_built_sources)
138 EXTRA_DIST += $(gobject_private_h_sources) $(gobject_extra_sources)
139 EXTRA_DIST += $(gobject_built_sources)
142 # rules to generate built sources
144 # setup autogeneration dependancies
145 gen_sources = xgen-gmh xgen-gmc xgen-gms
146 CLEANFILES += $(gen_sources)
148 $(libgobject_2_0_la_OBJECTS): $(gobject_built_sources) ${gobject_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
149 # initial creation of the real stamp-* files
150 gmarshal.h: # never add deps here
151 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
153 # normal autogeneration rules
154 # all autogenerated files need to be generated in the srcdir,
155 # so old versions get remade and are not confused with newer
156 # versions in the build dir. thus a development setup requires
157 # srcdir to be writable, passing --disable-rebuilds to
158 # ../configure will supress all autogeneration rules.
161 glib_genmarshal=$(GLIB_GENMARSHAL)
163 glib_genmarshal=./glib-genmarshal
166 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal$(EXEEXT)
167 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
168 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
169 && $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
170 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
171 && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
172 && rm -f xgen-gmh xgen-gmh~ \
173 && echo timestamp > $@
174 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
175 $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
176 && cp xgen-gmc $(srcdir)/gmarshal.c \
177 && rm -f xgen-gmc xgen-gmc~
178 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
179 grep '^[A-Z]' $(srcdir)/gmarshal.list \
180 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
181 && cp xgen-gms $(srcdir)/gmarshal.strings \
182 && rm -f xgen-gms xgen-gms~
183 glib-genmarshal.o: gmarshal.strings
187 libgobjectinclude_HEADERS = $(gobject_target_headers)
188 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
191 # programs to compile and install
193 bin_PROGRAMS = gobject-query glib-genmarshal
194 bin_SCRIPTS = glib-mkenums
195 noinst_PROGRAMS = testgobject testoverride
197 gobject_query_SOURCES = gobject-query.c
198 glib_genmarshal_SOURCES = glib-genmarshal.c
199 testgobject_SOURCES = testgobject.c
200 testoverride_SOURCES = testoverride.c
201 # link programs against libgobject
202 progs_LDADD = ./libgobject-2.0.la $(libglib)
203 glib_genmarshal_LDADD = $(libglib)
204 gobject_query_LDADD = $(progs_LDADD)
205 testgobject_LDADD = $(progs_LDADD)
206 testoverride_LDADD = $(progs_LDADD)
209 # manual pages to install
211 man_MANS = glib-genmarshal.1 glib-mkenums.1
231 @G_OBJECT_WIN32_RESOURCE@ : gobject.rc
232 $(top_srcdir)/build/win32/lt-compile-resource gobject.rc @G_OBJECT_WIN32_RESOURCE@
235 gobject-2.0.lib: libgobject-2.0.la gobject.def
236 lib -name:libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll -def:gobject.def -out:$@
238 gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
239 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
241 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.mingw.in
242 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
244 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.msc.in
245 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
247 dist-hook: $(BUILT_EXTRA_DIST)
248 files='$(BUILT_EXTRA_DIST)'; \
249 for f in $$files; do \
250 if test -f $$f; then d=.; else d=$(srcdir); fi; \
251 cp $$d/$$f $(distdir) || exit 1; done
253 install-data-local: install-ms-lib install-libtool-import-lib
255 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib