Remove ABI checking scripts
[platform/upstream/glib.git] / gobject / Makefile.am
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 include $(top_srcdir)/Makefile.decl
6
7 SUBDIRS = .
8 if BUILD_MODULAR_TESTS
9 SUBDIRS += tests 
10 endif
11
12 BUILT_SOURCES=
13 CLEANFILES=
14
15 AM_CPPFLAGS =                                   \
16         -DG_LOG_DOMAIN=\"GLib-GObject\"         \
17         $(glib_INCLUDES)                        \
18         $(GLIB_DEBUG_FLAGS)                     \
19         -DGOBJECT_COMPILATION
20
21 libglib = $(top_builddir)/glib/libglib-2.0.la
22
23 # libraries to compile and install
24 lib_LTLIBRARIES = libgobject-2.0.la
25
26 if OS_WIN32_AND_DLL_COMPILATION
27 if MS_LIB_AVAILABLE
28 noinst_DATA = gobject-2.0.lib
29
30 install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir)
31 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib
32 endif
33 endif
34
35 install-ms-lib:
36         $(install_ms_lib_cmd)
37
38 uninstall-ms-lib:
39         $(uninstall_ms_lib_cmd)
40
41 if PLATFORM_WIN32
42 no_undefined = -no-undefined
43 endif
44
45 if OS_WIN32_AND_DLL_COMPILATION
46 gobject_win32_res = gobject-win32-res.o
47 gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
48 endif
49
50 libgobjectincludedir = $(includedir)/glib-2.0/gobject
51 libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
52   $(gobject_win32_res_ldflag) \
53   -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
54   -export-dynamic $(no_undefined)
55
56 libgobject_2_0_la_CFLAGS = $(AM_CFLAGS) $(LIBFFI_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
57
58 libgobject_2_0_la_LIBADD = $(libglib) $(LIBFFI_LIBS)
59
60 libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res)
61
62 #
63 # setup source file variables
64 #
65 # GObject library header files for public installation
66 gobject_public_h_sources = \
67         glib-types.h            \
68         gbinding.h              \
69         gboxed.h                \
70         gclosure.h              \
71         genums.h                \
72         gmarshal.h              \
73         gobject.h               \
74         gparam.h                \
75         gparamspecs.h           \
76         gsignal.h               \
77         gsourceclosure.h        \
78         gtype.h                 \
79         gtypemodule.h           \
80         gtypeplugin.h           \
81         gvalue.h                \
82         gvaluearray.h           \
83         gvaluecollector.h       \
84         gvaluetypes.h           \
85         gobjectnotifyqueue.c
86
87 # GObject library header files that don't get installed
88 gobject_private_h_sources =     \
89         gatomicarray.h          \
90         gtype-private.h
91
92 # GObject library C sources to build the library from
93 gobject_c_sources = \
94         gobject_probes.d        \
95         gatomicarray.c          \
96         gbinding.c              \
97         gboxed.c                \
98         gclosure.c              \
99         genums.c                \
100         gmarshal.c              \
101         gobject.c               \
102         gobject_trace.h         \
103         gparam.c                \
104         gparamspecs.c           \
105         gsignal.c               \
106         gsourceclosure.c        \
107         gtype.c                 \
108         gtypemodule.c           \
109         gtypeplugin.c           \
110         gvalue.c                \
111         gvaluearray.c           \
112         gvaluetransform.c       \
113         gvaluetypes.c
114
115 if ENABLE_DTRACE
116 gobject_probes.h: gobject_probes.d Makefile
117         $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
118         @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
119 gobject_probes.o: gobject_probes.d Makefile
120         $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
121 BUILT_SOURCES += gobject_probes.h gobject_probes.o
122 CLEANFILES += gobject_probes.h
123 libgobject_2_0_la_LIBADD += gobject_probes.o
124 endif
125
126 if ENABLE_SYSTEMTAP
127 tapset_in_files = gobject.stp.in
128 tapsetdir   = @ABS_TAPSET_DIR@
129 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
130 EXTRA_DIST += $(tapset_in_files)
131 endif
132
133 # non-header sources (headers should be specified in the above variables)
134 # that don't serve as direct make target sources, i.e. they don't have
135 # their own .lo rules and don't get publically installed
136 gobject_extra_sources = \
137         gmarshal.list           \
138         gmarshal.strings
139
140
141 #
142 # setup GObject library sources and their dependancies
143 #
144 gobject_target_headers = $(gobject_public_h_sources)
145 gobject_target_sources = $(gobject_c_sources)
146 EXTRA_HEADERS =
147 EXTRA_DIST += \
148         $(gobject_private_h_sources)    \
149         $(gobject_extra_sources)        \
150         marshal-genstrings.pl
151
152 # This is read by gobject-introspection/misc/ and gtk-doc
153 gobject-public-headers.txt: Makefile
154         $(AM_V_GEN) echo $(gobject_public_h_sources) > $@.tmp && mv $@.tmp $@
155
156 CLEANFILES += gobject-public-headers.txt
157
158 all-local: gobject-public-headers.txt
159
160 #
161 # rules to generate built sources
162 #
163 # setup autogeneration dependancies
164 gen_sources = xgen-gmh xgen-gmc xgen-gms
165 CLEANFILES += $(gen_sources)
166
167 # normal autogeneration rules
168 # all autogenerated files need to be generated in the srcdir,
169 # so old versions get remade and are not confused with newer
170 # versions in the build dir. thus a development setup requires
171 # srcdir to be writable, passing --disable-rebuilds to
172 # ../configure will supress all autogeneration rules.
173
174
175 gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
176         $(AM_V_GEN) grep '^[A-Z]' $(srcdir)/gmarshal.list \
177         | $(SED) -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
178         && cp xgen-gms gmarshal.strings \
179         && rm -f xgen-gms xgen-gms~
180
181 glib-genmarshal.o: gmarshal.strings
182
183 # target platform:
184 libgobjectinclude_HEADERS = $(gobject_target_headers)
185 libgobject_2_0_la_SOURCES = $(gobject_target_sources)
186
187 #
188 # programs to compile and install
189 #
190 bin_PROGRAMS = gobject-query glib-genmarshal
191 bin_SCRIPTS = glib-mkenums
192 # source files
193 gobject_query_SOURCES = gobject-query.c
194 glib_genmarshal_SOURCES = glib-genmarshal.c
195 # link programs against libgobject
196 progs_LDADD = ./libgobject-2.0.la $(libglib)
197 glib_genmarshal_LDADD = $(libglib)
198 gobject_query_LDADD = $(progs_LDADD)
199
200 #
201 # auxillary files
202 #
203 EXTRA_DIST +=                   \
204         makefile.msc.in         \
205         gobject.rc.in           \
206         libgobject-gdb.py.in    \
207         glib-mkenums.in         \
208         abicheck.sh
209
210 CLEANFILES += libgobject-gdb.py
211
212 BUILT_EXTRA_DIST = \
213         makefile.msc            \
214         gobject.rc
215
216 gobject-win32-res.o: gobject.rc
217         $(AM_V_GEN) $(WINDRES) gobject.rc $@
218
219 gobject-2.0.lib: libgobject-2.0.la gobject.def
220         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gobject.def -out:$@
221
222 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gobject.vcproj ../build/win32/vs10/gobject.vcxproj ../build/win32/vs10/gobject.vcxproj.filters
223         files='$(BUILT_EXTRA_DIST)'; \
224         for f in $$files; do \
225           if test -f $$f; then d=.; else d=$(srcdir); fi; \
226           cp $$d/$$f $(distdir) || exit 1; done
227
228 ../build/win32/vs9/gobject.vcproj: $(top_srcdir)/build/win32/vs9/gobject.vcprojin
229         for F in $(libgobject_2_0_la_SOURCES); do \
230                 case $$F in \
231                 *.c) echo '   <File RelativePath="..\..\..\gobject\'$$F'" />' \
232                      ;; \
233                 esac; \
234         done >libgobject.sourcefiles
235         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gobject.vcprojin >$@
236         rm libgobject.sourcefiles
237
238 ../build/win32/vs10/gobject.vcxproj: $(top_srcdir)/build/win32/vs10/gobject.vcxprojin
239         for F in $(libgobject_2_0_la_SOURCES); do \
240                 case $$F in \
241                 *.c) echo '    <ClCompile Include="..\..\..\gobject\'$$F'" />' \
242                      ;; \
243                 esac; \
244         done >libgobject.vs10.sourcefiles
245         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxprojin >$@
246         rm libgobject.vs10.sourcefiles
247
248 ../build/win32/vs10/gobject.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin
249         for F in $(libgobject_2_0_la_SOURCES); do \
250                 case $$F in \
251                 *.c) echo '    <ClCompile Include="..\..\..\gobject\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
252                      ;; \
253                 esac; \
254         done >libgobject.vs10.sourcefiles.filters
255         $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gobject.vcxproj.filtersin >$@
256         rm libgobject.vs10.sourcefiles.filters
257
258 install-data-local: install-ms-lib
259
260 uninstall-local: uninstall-ms-lib uninstall-gdb
261
262 distclean-local:
263         if test $(srcdir) = .; then :; else \
264             rm -f $(BUILT_EXTRA_DIST); \
265         fi
266
267 # install gdb scripts
268 gdbdir = $(datadir)/glib-2.0/gdb
269 dist_gdb_SCRIPTS = gobject.py
270
271 libgobject-gdb.py: libgobject-gdb.py.in
272         $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
273
274 uninstall-gdb:
275         -rm -r $(DESTDIR)$(datadir)/gdb
276
277 install-data-hook: libgobject-gdb.py
278         mkdir -p $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)
279         $(INSTALL) $(builddir)/libgobject-gdb.py $(DESTDIR)$(datadir)/gdb/auto-load/$(ABS_GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION)-gdb.py
280 if HAVE_GLIB_RUNTIME_LIBDIR
281         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
282         mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
283         mv $(DESTDIR)$(libdir)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
284         rm -f $(DESTDIR)$(libdir)/libgobject-2.0.so
285         ln -s $(GLIB_RUNTIME_LIBDIR)/libgobject-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgobject-2.0.so
286 endif