source: trunk/third/glib2/gobject/Makefile.am @ 21369

Revision 21369, 6.3 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21368, which included commits to RCS files with non-trunk default branches.
Line 
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
6INCLUDES = \
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
16libglib = $(top_builddir)/glib/libglib-2.0.la
17
18# libraries to compile and install
19lib_LTLIBRARIES = libgobject-2.0.la
20
21if MS_LIB_AVAILABLE
22noinst_DATA = gobject-2.0.lib
23
24install-ms-lib:
25        $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
26
27uninstall-ms-lib:
28        -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
29else
30install-ms-lib:
31uninstall-ms-lib:
32endif
33
34if PLATFORM_WIN32
35no_undefined = -no-undefined
36endif
37
38if OS_WIN32
39export_symbols = -export-symbols $(srcdir)/gobject.def
40
41install-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
53uninstall-libtool-import-lib:
54        -rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def
55else
56install-libtool-import-lib:
57uninstall-libtool-import-lib:
58endif
59
60# libtool stuff: set version and export symbols for resolving
61libgobjectincludedir = $(includedir)/glib-2.0/gobject
62libgobject_2_0_la_LDFLAGS = \
63  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)  \
64  -export-dynamic $(no_undefined) $(export_symbols)
65
66libgobject_2_0_la_LIBADD = $(G_OBJECT_WIN32_RESOURCE) $(libglib)
67
68libgobject_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
74gobject_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
94gobject_private_h_sources =
95# GObject library C sources to build the library from
96gobject_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.
114BUILT_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
119gobject_extra_sources = \
120        gmarshal.list           \
121        gmarshal.strings
122
123
124#
125# setup GObject library sources and their dependancies
126#
127gobject_target_headers = $(gobject_public_h_sources)
128gobject_target_sources = $(gobject_c_sources)
129EXTRA_HEADERS =
130EXTRA_DIST = $(gobject_private_h_sources) $(gobject_extra_sources)
131
132#
133# rules to generate built sources
134#
135# setup autogeneration dependancies
136gen_sources = xgen-gmh xgen-gmc xgen-gms
137CLEANFILES = $(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
146if CROSS_COMPILING
147  glib_genmarshal=$(GLIB_GENMARSHAL)
148else
149  glib_genmarshal=./glib-genmarshal
150endif
151
152gmarshal.h: stamp-gmarshal.h
153        @true
154stamp-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
164gmarshal.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
169gmarshal.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
175glib-genmarshal.o: gmarshal.strings
176gsignal.lo: gmarshal.c
177
178
179# target platform:
180libgobjectinclude_HEADERS = $(gobject_target_headers)
181libgobject_2_0_la_SOURCES = $(gobject_target_sources)
182
183#
184# programs to compile and install
185#
186bin_PROGRAMS = gobject-query glib-genmarshal
187bin_SCRIPTS = glib-mkenums
188noinst_PROGRAMS = testgobject
189# source files
190gobject_query_SOURCES = gobject-query.c
191glib_genmarshal_SOURCES = glib-genmarshal.c
192testgobject_SOURCES = testgobject.c
193# link programs against libgobject
194progs_LDADD = ./libgobject-2.0.la $(libglib)
195glib_genmarshal_LDADD = $(libglib)
196gobject_query_LDADD = $(progs_LDADD)
197testgobject_LDADD = $(progs_LDADD)
198
199#
200# auxillary files
201#
202EXTRA_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
210BUILT_EXTRA_DIST = \
211        makefile.msc            \
212        gobject.rc              \
213        gmarshal.h              \
214        gmarshal.c              \
215        stamp-gmarshal.h
216
217if OS_WIN32
218$(G_OBJECT_WIN32_RESOURCE): gobject.rc
219        $(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
220endif
221
222gobject-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
225dist-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
231install-data-local: install-ms-lib install-libtool-import-lib
232
233uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
234
235distclean-local:
236        if test $(srcdir) = .; then :; else \
237            rm -f $(BUILT_EXTRA_DIST); \
238        fi
Note: See TracBrowser for help on using the repository browser.