1 # GRuntime - 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=g_log_domain_gruntime \
12 -DG_DISABLE_CONST_RETURNS \
15 libglib = $(top_builddir)/glib/libglib-1.3.la
17 # libraries to compile and install
18 lib_LTLIBRARIES = libgobject-1.3.la
21 no_undefined = -no-undefined
24 export_symbols = -export-symbols gobject.def
27 # libtool stuff: set version and export symbols for resolving
28 libgobjectincludedir = $(includedir)/glib-2.0/gobject
29 libgobject_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
30 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
31 -export-dynamic $(no_undefined) $(export_symbols) \
34 libgobject_1_3_la_LIBADD = @G_OBJECT_WIN32_RESOURCE@ $(libglib)
36 libgobject_1_3_la_DEPENDENCIES = @G_OBJECT_WIN32_RESOURCE@
39 # setup source file variables
41 # GRuntime header files for public installation (non-generated)
42 gruntime_public_h_sources = @STRIP_BEGIN@ \
58 gobjectnotifyqueue.c \
60 # GRuntime header files that don't get installed
61 gruntime_private_h_sources = @STRIP_BEGIN@ \
63 # GRuntime C sources to build the library from
64 gruntime_c_sources = @STRIP_BEGIN@ \
82 # we use our own built_sources variable rules to avoid automake's
83 # BUILT_SOURCES oddities
84 # we generate frequently rebuild files piggyback on a stamp file, so sources
85 # depending on them only get rebuild when the built source actually changed
88 # built sources that get installed with the header files
89 gruntime_built_public_sources = @STRIP_BEGIN@ \
92 # built sources that don't get installed
93 gruntime_built_sources = @STRIP_BEGIN@ \
96 ${gruntime_built_public_sources} \
98 # non-header sources (headers should be specified in the above variables)
99 # that don't serve as direct make target sources, i.e. they don't have
100 # their own .lo rules and don't get publically installed
101 gruntime_extra_sources = @STRIP_BEGIN@ \
108 # setup GRuntime sources and their dependancies
110 gruntime_target_headers = $(gruntime_public_h_sources) $(gruntime_built_public_sources)
111 gruntime_target_sources = $(gruntime_c_sources)
112 MAINTAINERCLEANFILES += $(gruntime_built_sources)
114 EXTRA_DIST += $(gruntime_private_h_sources) $(gruntime_extra_sources)
115 EXTRA_DIST += $(gruntime_built_sources)
118 # rules to generate built sources
120 # setup autogeneration dependancies
121 gen_sources = xgen-gmh xgen-gmc xgen-gms
122 CLEANFILES += $(gen_sources)
124 $(libgobject_1_3_la_OBJECTS): $(gruntime_built_sources) ${gruntime_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
125 # initial creation of the real stamp-* files
126 gmarshal.h: # never add deps here
127 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
128 # normal autogeneration rules
129 # all autogenerated files need to be generated in the srcdir,
130 # so old versions get remade and are not confused with newer
131 # versions in the build dir. thus a development setup requires
132 # srcdir to be writable, passing --disable-rebuilds to
133 # ../configure will supress all autogeneration rules.
134 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal$(EXEEXT)
135 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
136 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
137 && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
138 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
139 && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
140 && rm -f xgen-gmh xgen-gmh~ \
141 && echo timestamp > $@
142 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
143 ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
144 && cp xgen-gmc $(srcdir)/gmarshal.c \
145 && rm -f xgen-gmc xgen-gmc~
146 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
147 grep '^[A-Z]' $(srcdir)/gmarshal.list \
148 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
149 && cp xgen-gms $(srcdir)/gmarshal.strings \
150 && rm -f xgen-gms xgen-gms~
151 glib-genmarshal.o: gmarshal.strings
155 libgobjectinclude_HEADERS = $(gruntime_target_headers)
156 libgobject_1_3_la_SOURCES = $(gruntime_target_sources)
159 # programs to compile and install
161 bin_PROGRAMS = gobject-query glib-genmarshal
162 bin_SCRIPTS = glib-mkenums
163 noinst_PROGRAMS = testgruntime
165 gobject_query_SOURCES = gobject-query.c
166 glib_genmarshal_SOURCES = glib-genmarshal.c
167 testgruntime_SOURCES = testgruntime.c
168 # link programs against libgobject
169 progs_LDADD = ./libgobject-1.3.la $(libglib)
170 glib_genmarshal_LDADD = $(libglib)
171 gobject_query_LDADD = $(progs_LDADD)
172 testgruntime_LDADD = $(progs_LDADD)
175 # manual pages to install
177 man_MANS = glib-genmarshal.1 glib-mkenums.1
196 glib-mkenums: $(srcdir)/glib-mkenums
197 if test -e glib-mkenums; then \
200 cp $(srcdir)/glib-mkenums glib-mkenums
203 @G_OBJECT_WIN32_RESOURCE@ : gobject.rc
204 $(top_srcdir)/build/win32/lt-compile-resource gobject.rc @G_OBJECT_WIN32_RESOURCE@
207 gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
208 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
210 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.mingw.in
211 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
213 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.msc.in
214 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
216 dist-hook: $(BUILT_EXTRA_DIST)
217 files='$(BUILT_EXTRA_DIST)'; \
218 for f in $$files; do \
219 if test -f $$f; then d=.; else d=$(srcdir); fi; \
220 cp $$d/$$f $(distdir) || exit 1; done