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 = $(libglib)
37 # setup source file variables
39 # GRuntime header files for public installation (non-generated)
40 gruntime_public_h_sources = @STRIP_BEGIN@ \
56 gobjectnotifyqueue.c \
58 # GRuntime header files that don't get installed
59 gruntime_private_h_sources = @STRIP_BEGIN@ \
61 # GRuntime C sources to build the library from
62 gruntime_c_sources = @STRIP_BEGIN@ \
80 # we use our own built_sources variable rules to avoid automake's
81 # BUILT_SOURCES oddities
82 # we generate frequently rebuild files piggyback on a stamp file, so sources
83 # depending on them only get rebuild when the built source actually changed
86 # built sources that get installed with the header files
87 gruntime_built_public_sources = @STRIP_BEGIN@ \
90 # built sources that don't get installed
91 gruntime_built_sources = @STRIP_BEGIN@ \
94 ${gruntime_built_public_sources} \
96 # non-header sources (headers should be specified in the above variables)
97 # that don't serve as direct make target sources, i.e. they don't have
98 # their own .lo rules and don't get publically installed
99 gruntime_extra_sources = @STRIP_BEGIN@ \
106 # setup GRuntime sources and their dependancies
108 gruntime_target_headers = $(gruntime_public_h_sources) $(gruntime_built_public_sources)
109 gruntime_target_sources = $(gruntime_c_sources)
110 MAINTAINERCLEANFILES += $(gruntime_built_sources)
112 EXTRA_DIST += $(gruntime_private_h_sources) $(gruntime_extra_sources)
113 EXTRA_DIST += $(gruntime_built_sources)
116 # rules to generate built sources
118 # setup autogeneration dependancies
119 gen_sources = xgen-gmh xgen-gmc xgen-gms
120 CLEANFILES += $(gen_sources)
122 $(libgobject_1_3_la_OBJECTS): $(gruntime_built_sources) ${gruntime_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
123 # initial creation of the real stamp-* files
124 gmarshal.h: # never add deps here
125 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
126 # normal autogeneration rules
127 # all autogenerated files need to be generated in the srcdir,
128 # so old versions get remade and are not confused with newer
129 # versions in the build dir. thus a development setup requires
130 # srcdir to be writable, passing --disable-rebuilds to
131 # ../configure will supress all autogeneration rules.
132 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal$(EXEEXT)
133 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
134 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
135 && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
136 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
137 && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
138 && rm -f xgen-gmh xgen-gmh~ \
139 && echo timestamp > $@
140 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
141 ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
142 && cp xgen-gmc $(srcdir)/gmarshal.c \
143 && rm -f xgen-gmc xgen-gmc~
144 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
145 grep '^[A-Z]' $(srcdir)/gmarshal.list \
146 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
147 && cp xgen-gms $(srcdir)/gmarshal.strings \
148 && rm -f xgen-gms xgen-gms~
149 glib-genmarshal.o: gmarshal.strings
153 libgobjectinclude_HEADERS = $(gruntime_target_headers)
154 libgobject_1_3_la_SOURCES = $(gruntime_target_sources)
157 # programs to compile and install
159 bin_PROGRAMS = gobject-query glib-genmarshal
160 bin_SCRIPTS = glib-mkenums
161 noinst_PROGRAMS = testgruntime
163 gobject_query_SOURCES = gobject-query.c
164 glib_genmarshal_SOURCES = glib-genmarshal.c
165 testgruntime_SOURCES = testgruntime.c
166 # link programs against libgobject
167 progs_LDADD = ./libgobject-1.3.la $(libglib)
168 glib_genmarshal_LDADD = $(libglib)
169 gobject_query_LDADD = $(progs_LDADD)
170 testgruntime_LDADD = $(progs_LDADD)
173 # manual pages to install
175 man_MANS = glib-genmarshal.1 glib-mkenums.1
194 glib-mkenums: $(srcdir)/glib-mkenums
195 if test -e glib-mkenums; then \
198 cp $(srcdir)/glib-mkenums glib-mkenums
200 gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
201 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
203 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.mingw.in
204 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
206 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.msc.in
207 cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
209 dist-hook: $(BUILT_EXTRA_DIST)
210 files='$(BUILT_EXTRA_DIST)'; \
211 for f in $$files; do \
212 if test -f $$f; then d=.; else d=$(srcdir); fi; \
213 cp $$d/$$f $(distdir) || exit 1; done