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