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