]> Pileus Git - ~andy/gtk/blob - gdk/Makefile.am
gdk: Remove unused medialib code
[~andy/gtk] / gdk / Makefile.am
1 ## Makefile.am for gtk+/gdk
2 include $(top_srcdir)/Makefile.decl
3 -include $(INTROSPECTION_MAKEFILE)
4 INTROSPECTION_GIRS =
5 INTROSPECTION_SCANNER_ARGS = \
6    --add-include-path=../gdk
7 INTROSPECTION_COMPILER_ARGS = \
8    --includedir=$(srcdir) \
9    --includedir=.
10
11 SUBDIRS = $(gdktarget) . tests
12 DIST_SUBDIRS = win32 x11 quartz tests
13
14 CLEANFILES =
15
16 EXTRA_DIST +=                   \
17         keynames.txt            \
18         keyname-table.h         \
19         gen-keyname-table.pl    \
20         gdkconfig.h.win32       \
21         gdkkeysyms-update.pl    \
22         gdk.def                 \
23         gdkmarshalers.list      \
24         gdkwindowimpl.h         \
25         makeenums.pl            \
26         makefile.msc            \
27         gdk.symbols             \
28         gdkenumtypes.c.template \
29         gdkenumtypes.h.template \
30         abicheck.sh
31
32 INCLUDES =                              \
33         -DG_LOG_DOMAIN=\"Gdk\"          \
34         -DGDK_COMPILATION               \
35         -I$(top_srcdir)                 \
36         -I$(top_builddir)/gdk           \
37         $(GTK_DEBUG_FLAGS)              \
38         $(GDK_DEP_CFLAGS)
39
40 gtarget=$(gdktarget)
41
42 if PLATFORM_WIN32
43 no_undefined = -no-undefined
44 endif
45
46 # libtool stuff: set version and export symbols for resolving
47 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
48 # we use the general approach here
49 LDADD = \
50         $(GTK_LINK_FLAGS)                                               \
51         -version-info $(LT_VERSION_INFO)                                \
52         -export-dynamic                                                 \
53         -rpath $(libdir)                                                \
54         $(no_undefined)                                                 \
55         $(LIBTOOL_EXPORT_OPTIONS)
56
57 #
58 # setup source file variables
59 #
60 #
61 # GDK header files for public installation (non-generated)
62 #
63 gdk_public_h_sources =                          \
64         gdk.h                                   \
65         gdkapplaunchcontext.h                   \
66         gdkcairo.h                              \
67         gdkcolor.h                              \
68         gdkcursor.h                             \
69         gdkdevice.h                             \
70         gdkdevicemanager.h                      \
71         gdkdisplay.h                            \
72         gdkdisplaymanager.h                     \
73         gdkdnd.h                                \
74         gdkdrawable.h                           \
75         gdkevents.h                             \
76         gdkinput.h                              \
77         gdkkeys.h                               \
78         gdkkeysyms.h                            \
79         gdkkeysyms-compat.h                     \
80         gdkmain.h                               \
81         gdkpango.h                              \
82         gdkpixbuf.h                             \
83         gdkprivate.h                            \
84         gdkproperty.h                           \
85         gdkrectangle.h                          \
86         gdkrgba.h                               \
87         gdkscreen.h                             \
88         gdkselection.h                          \
89         gdkspawn.h                              \
90         gdktestutils.h                          \
91         gdkthreads.h                            \
92         gdktypes.h                              \
93         gdkvisual.h                             \
94         gdkwindow.h
95
96 gdk_built_public_sources =                      \
97         gdkenumtypes.h
98
99 gdk_private_headers =                           \
100         gdkinternals.h                          \
101         gdkdeviceprivate.h                      \
102         gdkintl.h                               \
103         gdkpoly-generic.h
104
105 gdk_c_sources =                 \
106         gdk.c                   \
107         gdkapplaunchcontext.c   \
108         gdkcairo.c              \
109         gdkcolor.c              \
110         gdkcursor.c             \
111         gdkdevice.c             \
112         gdkdevicemanager.c      \
113         gdkdisplay.c            \
114         gdkdisplaymanager.c     \
115         gdkdnd.c                \
116         gdkdraw.c               \
117         gdkevents.c             \
118         gdkglobals.c            \
119         gdkkeys.c               \
120         gdkkeyuni.c             \
121         gdkoffscreenwindow.c    \
122         gdkpango.c              \
123         gdkpixbuf-drawable.c    \
124         gdkrectangle.c          \
125         gdkrgba.c               \
126         gdkscreen.c             \
127         gdkselection.c          \
128         gdkvisual.c             \
129         gdkwindow.c             \
130         gdkwindowimpl.c
131
132 gdk_built_sources =                             \
133         gdkenumtypes.c                          \
134         gdkmarshalers.h                         \
135         gdkmarshalers.c                         \
136         $(gdk_built_public_sources)
137
138 #
139 # setup GDK sources and their dependencies
140 #
141
142 gdkincludedir = $(includedir)/gtk-3.0/gdk
143 gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
144
145 common_sources =                \
146         $(gdk_private_headers)  \
147         $(gdk_c_sources)        \
148         gdkenumtypes.c          \
149         gdkmarshalers.c         \
150         gdkmarshalers.h
151
152 libgdk_x11_3_0_la_SOURCES = $(common_sources)
153 libgdk_x11_3_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS)
154 libgdk_x11_3_0_la_LDFLAGS = $(LDADD)
155
156 libgdk_quartz_3_0_la_SOURCES = $(common_sources) gdkkeynames.c
157 libgdk_quartz_3_0_la_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS)
158 libgdk_quartz_3_0_la_LDFLAGS = $(LDADD)
159
160 libgdk_win32_3_0_la_SOURCES = $(common_sources) gdkkeynames.c
161 libgdk_win32_3_0_la_LIBADD = win32/libgdk-win32.la $(GDK_DEP_LIBS)
162 libgdk_win32_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
163 libgdk_win32_3_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def $(LDADD)
164
165 if HAVE_INTROSPECTION
166
167 introspection_files =           \
168         $(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources))      \
169         $(gdk_c_sources)        \
170         gdkenumtypes.c          \
171         gdkenumtypes.h
172
173 Gdk-3.0.gir: $(gdktargetlib) Makefile
174 Gdk_3_0_gir_SCANNERFLAGS = --warn-all
175 Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
176 Gdk_3_0_gir_LIBS = $(gdktargetlib)
177 Gdk_3_0_gir_FILES = $(introspection_files)
178 Gdk_3_0_gir_CFLAGS = $(INCLUDES)
179 INTROSPECTION_GIRS += Gdk-3.0.gir
180
181 if USE_X11
182 x11_introspection_files =               \
183         x11/checksettings.c             \
184         x11/gdkapplaunchcontext-x11.c   \
185         x11/gdkasync.c                  \
186         x11/gdkcursor-x11.c             \
187         x11/gdkdevice-core.c            \
188         x11/gdkdevicemanager-core.c     \
189         x11/gdkdevicemanager-x11.c      \
190         x11/gdkdevicemanager-xi2.c      \
191         x11/gdkdevicemanager-xi.c       \
192         x11/gdkdevice-xi2.c             \
193         x11/gdkdevice-xi.c              \
194         x11/gdkdisplay-x11.c            \
195         x11/gdkdnd-x11.c                \
196         x11/gdkeventsource.c            \
197         x11/gdkeventtranslator.c        \
198         x11/gdkgeometry-x11.c           \
199         x11/gdkglobals-x11.c            \
200         x11/gdkim-x11.c                 \
201         x11/gdkinput.c                  \
202         x11/gdkkeys-x11.c               \
203         x11/gdkmain-x11.c               \
204         x11/gdkproperty-x11.c           \
205         x11/gdkscreen-x11.c             \
206         x11/gdkselection-x11.c          \
207         x11/gdksettings.c               \
208         x11/gdkspawn-x11.c              \
209         x11/gdktestutils-x11.c          \
210         x11/gdkvisual-x11.c             \
211         x11/gdkwindow-x11.c             \
212         x11/gdkxftdefaults.c            \
213         x11/gdkxid.c                    \
214         x11/xsettings-client.c          \
215         x11/xsettings-common.c          \
216         x11/gdkx.h
217
218 GdkX11-3.0.gir: $(gdktargetlib) Gdk-3.0.gir Makefile
219 GdkX11_3_0_gir_SCANNERFLAGS = --warn-all --strip-prefix=Gdk
220 GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
221 GdkX11_3_0_gir_LIBS = $(gdktargetlib)
222 GdkX11_3_0_gir_FILES = $(x11_introspection_files)
223 GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk
224 INTROSPECTION_GIRS += GdkX11-3.0.gir
225
226 introspection_files += $(filter-out x11/gdkx.h, $(x11_introspection_files))
227
228 endif # USE_X11
229
230 girdir = $(datadir)/gir-1.0
231 gir_DATA = $(INTROSPECTION_GIRS)
232
233 typelibsdir = $(libdir)/girepository-1.0
234 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
235
236 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
237
238 endif # HAVE_INTROSPECTION
239
240 if OS_WIN32
241 install-def-file: gdk.def
242         mkdir -p $(DESTDIR)$(libdir)
243         $(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-3.0.def
244 uninstall-def-file:
245         -rm $(DESTDIR)$(libdir)/gdk-win32-3.0.def
246 else
247 install-def-file:
248 uninstall-def-file:
249 endif
250
251 if MS_LIB_AVAILABLE
252 noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
253
254 gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def
255         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@
256
257 install-ms-lib:
258         mkdir -p $(DESTDIR)$(libdir)
259         $(INSTALL) gdk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
260
261 uninstall-ms-lib:
262         -rm $(DESTDIR)$(libdir)/gdk-win32-$(GTK_API_VERSION).lib
263 else
264 install-ms-lib:
265 uninstall-ms-lib:
266 endif
267
268 # This places the generated .def file in srcdir, since it is expected to be there.
269 # (The one from a tarball is)
270 gdk.def: gdk.symbols
271         (echo -e EXPORTS; $(CPP) -P -DGDK_WINDOWING_WIN32 - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/   /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
272
273 TESTS_ENVIRONMENT = srcdir="$(srcdir)"
274 if OS_LINUX
275 TESTS = abicheck.sh
276 endif
277
278
279 lib_LTLIBRARIES = $(gdktargetlib)
280
281 EXTRA_LTLIBRARIES = libgdk-x11-3.0.la libgdk-win32-3.0.la libgdk-quartz-3.0.la
282
283 MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
284 EXTRA_DIST += $(gdk_built_sources)
285 EXTRA_HEADERS =
286
287 #
288 # Rule to install gdkconfig.h header file
289 #
290 configexecincludedir = $(libdir)/gtk-3.0/include
291 #configexecinclude_DATA = gdkconfig.h
292
293 install-exec-local: gdkconfig.h
294         $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
295         file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \
296         if test -r $$file && cmp -s gdkconfig.h $$file; then :; \
297         else $(INSTALL_DATA) gdkconfig.h $$file; fi
298
299 install-exec-hook:
300 if DISABLE_EXPLICIT_DEPS
301         $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gdktargetlib)
302 endif
303
304 #note: not gdkconfig.h
305 BUILT_SOURCES = \
306         $(gdk_built_sources)                    \
307         gdkconfig.h
308
309 gdkenumtypes.h: stamp-gdkenumtypes.h
310         @true
311 stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.h.template
312         ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
313                 $(gdk_public_h_sources) ) >> xgen-geth \
314         && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
315         && rm -f xgen-geth \
316         && echo timestamp > $(@F)
317 gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
318         ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
319                 $(gdk_public_h_sources) ) > xgen-getc \
320         && cp xgen-getc gdkenumtypes.c  \
321         && rm -f xgen-getc
322
323
324 # Marshaller generation
325 #
326 gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
327         $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
328         && mv gdkmarshalers-h.tmp gdkmarshalers.h \
329         || ( rm -f gdkmarshalers-h.tmp && exit 1)
330 gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
331         $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body > gdkmarshalers-c.tmp      \
332         && mv gdkmarshalers-c.tmp gdkmarshalers.c \
333         || ( rm -f gdkmarshalers-c.tmp && exit 1 )
334
335 gdkconfig.h: stamp-gc-h
336         @if test -f gdkconfig.h; then :; \
337         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
338 stamp-gc-h: $(top_builddir)/config.status
339         cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h
340         echo timestamp > stamp-gc-h
341
342 dist-hook: ../build/win32/vs9/gdk.vcproj
343
344 ../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
345         for F in $(libgdk_win32_3_0_la_SOURCES); do \
346                 case $$F in \
347                 *.c) echo '   <File RelativePath="..\..\..\gdk\'$$F'" />' \
348                      ;; \
349                 esac; \
350         done >libgdk.sourcefiles
351         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk.vcprojin >$@
352         rm libgdk.sourcefiles
353
354 DISTCLEANFILES = gdkconfig.h stamp-gc-h
355
356 install-data-local: install-ms-lib install-def-file
357
358 uninstall-local: uninstall-ms-lib uninstall-def-file
359         rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
360
361 # if srcdir!=builddir, clean out maintainer-clean files from builddir
362 # this allows dist to pass.
363 distclean-local:
364         if test $(srcdir) != .; then \
365           rm -f $(MAINTAINERCLEANFILES); \
366         fi
367
368 .PHONY: files
369
370 files:
371         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
372           echo $$p; \
373         done
374
375 -include $(top_srcdir)/git.mk