1 | # GObject - GLib Type, Object, Parameter and Signal Library |
---|
2 | # Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc. |
---|
3 | # |
---|
4 | ## Process this file with automake to produce Makefile.in |
---|
5 | |
---|
6 | INCLUDES = \ |
---|
7 | -DG_LOG_DOMAIN=\"GLib-GObject\" \ |
---|
8 | -I$(top_srcdir) \ |
---|
9 | -I$(top_srcdir)/glib \ |
---|
10 | -I$(top_builddir) \ |
---|
11 | $(GLIB_DEBUG_FLAGS) \ |
---|
12 | -DG_DISABLE_DEPRECATED \ |
---|
13 | -DGOBJECT_COMPILATION \ |
---|
14 | -DG_DISABLE_CONST_RETURNS |
---|
15 | |
---|
16 | libglib = $(top_builddir)/glib/libglib-2.0.la |
---|
17 | |
---|
18 | # libraries to compile and install |
---|
19 | lib_LTLIBRARIES = libgobject-2.0.la |
---|
20 | |
---|
21 | if MS_LIB_AVAILABLE |
---|
22 | noinst_DATA = gobject-2.0.lib |
---|
23 | |
---|
24 | install-ms-lib: |
---|
25 | $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir) |
---|
26 | |
---|
27 | uninstall-ms-lib: |
---|
28 | -rm $(DESTDIR)$(libdir)/gobject-2.0.lib |
---|
29 | else |
---|
30 | install-ms-lib: |
---|
31 | uninstall-ms-lib: |
---|
32 | endif |
---|
33 | |
---|
34 | if PLATFORM_WIN32 |
---|
35 | no_undefined = -no-undefined |
---|
36 | endif |
---|
37 | |
---|
38 | if OS_WIN32 |
---|
39 | export_symbols = -export-symbols $(srcdir)/gobject.def |
---|
40 | |
---|
41 | install-libtool-import-lib: |
---|
42 | # Don't put the bug compatibility entries in the import lib! |
---|
43 | # (Unfortunately the GNU linker doesn't yet understand the PRIVATE |
---|
44 | # directive in .def files.) |
---|
45 | # |
---|
46 | for entry in `grep PRIVATE gobject.def | sed -e 's/PRIVATE//'`; do \ |
---|
47 | file=`nm -A .libs/libgobject-2.0.dll.a | grep -m 1 $$entry | cut -d: -f2`; \ |
---|
48 | ar d .libs/libgobject-2.0.dll.a $$file; \ |
---|
49 | done |
---|
50 | $(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir) |
---|
51 | $(INSTALL) $(srcdir)/gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def |
---|
52 | |
---|
53 | uninstall-libtool-import-lib: |
---|
54 | -rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def |
---|
55 | else |
---|
56 | install-libtool-import-lib: |
---|
57 | uninstall-libtool-import-lib: |
---|
58 | endif |
---|
59 | |
---|
60 | # libtool stuff: set version and export symbols for resolving |
---|
61 | libgobjectincludedir = $(includedir)/glib-2.0/gobject |
---|
62 | libgobject_2_0_la_LDFLAGS = \ |
---|
63 | -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ |
---|
64 | -export-dynamic $(no_undefined) $(export_symbols) |
---|
65 | |
---|
66 | libgobject_2_0_la_LIBADD = $(G_OBJECT_WIN32_RESOURCE) $(libglib) |
---|
67 | |
---|
68 | libgobject_2_0_la_DEPENDENCIES = $(G_OBJECT_WIN32_RESOURCE) $(GOBJECT_DEF) |
---|
69 | |
---|
70 | # |
---|
71 | # setup source file variables |
---|
72 | # |
---|
73 | # GObject library header files for public installation |
---|
74 | gobject_public_h_sources = \ |
---|
75 | gboxed.h \ |
---|
76 | gclosure.h \ |
---|
77 | genums.h \ |
---|
78 | gobject.h \ |
---|
79 | gparam.h \ |
---|
80 | gparamspecs.h \ |
---|
81 | gsignal.h \ |
---|
82 | gsourceclosure.h \ |
---|
83 | gtype.h \ |
---|
84 | gtypemodule.h \ |
---|
85 | gtypeplugin.h \ |
---|
86 | gvalue.h \ |
---|
87 | gvaluearray.h \ |
---|
88 | gvaluecollector.h \ |
---|
89 | gvaluetypes.h \ |
---|
90 | gobjectnotifyqueue.c \ |
---|
91 | gmarshal.h |
---|
92 | |
---|
93 | # GObject library header files that don't get installed |
---|
94 | gobject_private_h_sources = |
---|
95 | # GObject library C sources to build the library from |
---|
96 | gobject_c_sources = \ |
---|
97 | gboxed.c \ |
---|
98 | gclosure.c \ |
---|
99 | genums.c \ |
---|
100 | gobject.c \ |
---|
101 | gparam.c \ |
---|
102 | gparamspecs.c \ |
---|
103 | gsignal.c \ |
---|
104 | gsourceclosure.c \ |
---|
105 | gtype.c \ |
---|
106 | gtypemodule.c \ |
---|
107 | gtypeplugin.c \ |
---|
108 | gvalue.c \ |
---|
109 | gvaluearray.c \ |
---|
110 | gvaluetransform.c \ |
---|
111 | gvaluetypes.c |
---|
112 | |
---|
113 | # these sources (also mentioned above) are generated. |
---|
114 | BUILT_SOURCES = gmarshal.h gmarshal.c |
---|
115 | |
---|
116 | # non-header sources (headers should be specified in the above variables) |
---|
117 | # that don't serve as direct make target sources, i.e. they don't have |
---|
118 | # their own .lo rules and don't get publically installed |
---|
119 | gobject_extra_sources = \ |
---|
120 | gmarshal.list \ |
---|
121 | gmarshal.strings |
---|
122 | |
---|
123 | |
---|
124 | # |
---|
125 | # setup GObject library sources and their dependancies |
---|
126 | # |
---|
127 | gobject_target_headers = $(gobject_public_h_sources) |
---|
128 | gobject_target_sources = $(gobject_c_sources) |
---|
129 | EXTRA_HEADERS = |
---|
130 | EXTRA_DIST = $(gobject_private_h_sources) $(gobject_extra_sources) |
---|
131 | |
---|
132 | # |
---|
133 | # rules to generate built sources |
---|
134 | # |
---|
135 | # setup autogeneration dependancies |
---|
136 | gen_sources = xgen-gmh xgen-gmc xgen-gms |
---|
137 | CLEANFILES = $(gen_sources) |
---|
138 | |
---|
139 | # normal autogeneration rules |
---|
140 | # all autogenerated files need to be generated in the srcdir, |
---|
141 | # so old versions get remade and are not confused with newer |
---|
142 | # versions in the build dir. thus a development setup requires |
---|
143 | # srcdir to be writable, passing --disable-rebuilds to |
---|
144 | # ../configure will supress all autogeneration rules. |
---|
145 | |
---|
146 | if CROSS_COMPILING |
---|
147 | glib_genmarshal=$(GLIB_GENMARSHAL) |
---|
148 | else |
---|
149 | glib_genmarshal=./glib-genmarshal |
---|
150 | endif |
---|
151 | |
---|
152 | gmarshal.h: stamp-gmarshal.h |
---|
153 | @true |
---|
154 | stamp-gmarshal.h: @REBUILD@ gmarshal.list glib-genmarshal$(EXEEXT) |
---|
155 | $(MAKE) glib-genmarshal$(EXEEXT) |
---|
156 | echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \ |
---|
157 | && echo "#define __G_MARSHAL_H__" >> xgen-gmh \ |
---|
158 | && $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \ |
---|
159 | && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \ |
---|
160 | && (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \ |
---|
161 | && rm -f xgen-gmh xgen-gmh~ \ |
---|
162 | && echo timestamp > $@ |
---|
163 | |
---|
164 | gmarshal.c: @REBUILD@ stamp-gmarshal.h |
---|
165 | $(glib_genmarshal) --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \ |
---|
166 | && cp xgen-gmc gmarshal.c \ |
---|
167 | && rm -f xgen-gmc xgen-gmc~ |
---|
168 | |
---|
169 | gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list |
---|
170 | grep '^[A-Z]' $(srcdir)/gmarshal.list \ |
---|
171 | | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \ |
---|
172 | && cp xgen-gms gmarshal.strings \ |
---|
173 | && rm -f xgen-gms xgen-gms~ |
---|
174 | |
---|
175 | glib-genmarshal.o: gmarshal.strings |
---|
176 | gsignal.lo: gmarshal.c |
---|
177 | |
---|
178 | |
---|
179 | # target platform: |
---|
180 | libgobjectinclude_HEADERS = $(gobject_target_headers) |
---|
181 | libgobject_2_0_la_SOURCES = $(gobject_target_sources) |
---|
182 | |
---|
183 | # |
---|
184 | # programs to compile and install |
---|
185 | # |
---|
186 | bin_PROGRAMS = gobject-query glib-genmarshal |
---|
187 | bin_SCRIPTS = glib-mkenums |
---|
188 | noinst_PROGRAMS = testgobject |
---|
189 | # source files |
---|
190 | gobject_query_SOURCES = gobject-query.c |
---|
191 | glib_genmarshal_SOURCES = glib-genmarshal.c |
---|
192 | testgobject_SOURCES = testgobject.c |
---|
193 | # link programs against libgobject |
---|
194 | progs_LDADD = ./libgobject-2.0.la $(libglib) |
---|
195 | glib_genmarshal_LDADD = $(libglib) |
---|
196 | gobject_query_LDADD = $(progs_LDADD) |
---|
197 | testgobject_LDADD = $(progs_LDADD) |
---|
198 | |
---|
199 | # |
---|
200 | # auxillary files |
---|
201 | # |
---|
202 | EXTRA_DIST += \ |
---|
203 | makefile.msc.in \ |
---|
204 | gobject.def \ |
---|
205 | gobject.rc.in \ |
---|
206 | glib-genmarshal.1 \ |
---|
207 | glib-mkenums.in \ |
---|
208 | glib-mkenums.1 |
---|
209 | |
---|
210 | BUILT_EXTRA_DIST = \ |
---|
211 | makefile.msc \ |
---|
212 | gobject.rc \ |
---|
213 | gmarshal.h \ |
---|
214 | gmarshal.c \ |
---|
215 | stamp-gmarshal.h |
---|
216 | |
---|
217 | if OS_WIN32 |
---|
218 | $(G_OBJECT_WIN32_RESOURCE): gobject.rc |
---|
219 | $(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@ |
---|
220 | endif |
---|
221 | |
---|
222 | gobject-2.0.lib: libgobject-2.0.la gobject.def |
---|
223 | lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@ |
---|
224 | |
---|
225 | dist-hook: $(BUILT_EXTRA_DIST) |
---|
226 | files='$(BUILT_EXTRA_DIST)'; \ |
---|
227 | for f in $$files; do \ |
---|
228 | if test -f $$f; then d=.; else d=$(srcdir); fi; \ |
---|
229 | cp $$d/$$f $(distdir) || exit 1; done |
---|
230 | |
---|
231 | install-data-local: install-ms-lib install-libtool-import-lib |
---|
232 | |
---|
233 | uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib |
---|
234 | |
---|
235 | distclean-local: |
---|
236 | if test $(srcdir) = .; then :; else \ |
---|
237 | rm -f $(BUILT_EXTRA_DIST); \ |
---|
238 | fi |
---|