1 | ## Makefile.am for gtk+/gdk |
---|
2 | |
---|
3 | SUBDIRS=$(gdktarget) |
---|
4 | DIST_SUBDIRS=linux-fb win32 x11 |
---|
5 | |
---|
6 | EXTRA_DIST = \ |
---|
7 | gdkconfig.h.win32 \ |
---|
8 | gdk.def \ |
---|
9 | gdkmarshalers.list \ |
---|
10 | makeenums.pl \ |
---|
11 | makefile.msc |
---|
12 | |
---|
13 | common_includes = @STRIP_BEGIN@ \ |
---|
14 | -DG_LOG_DOMAIN=\"Gdk\" \ |
---|
15 | -DGDK_COMPILATION \ |
---|
16 | -I$(top_srcdir) \ |
---|
17 | -I$(top_builddir)/gdk \ |
---|
18 | -I$(top_srcdir)/gdk-pixbuf \ |
---|
19 | -DG_DISABLE_DEPRECATED \ |
---|
20 | -DGDK_PIXBUF_DISABLE_DEPRECATED \ |
---|
21 | -DGDK_DISABLE_DEPRECATED \ |
---|
22 | @GTK_DEBUG_FLAGS@ \ |
---|
23 | @GDK_DEP_CFLAGS@ \ |
---|
24 | @STRIP_END@ |
---|
25 | |
---|
26 | INCLUDES = $(common_includes) |
---|
27 | gtarget=@gdktarget@ |
---|
28 | |
---|
29 | if PLATFORM_WIN32 |
---|
30 | no_undefined = -no-undefined |
---|
31 | |
---|
32 | if HAVE_WINTAB |
---|
33 | wintab_lib = -Lwin32 -lwntab32x |
---|
34 | endif |
---|
35 | |
---|
36 | if HAVE_IE55 |
---|
37 | ie55uuid_lib = -Lwin32 -lie55uuid |
---|
38 | endif |
---|
39 | endif |
---|
40 | |
---|
41 | if OS_WIN32 |
---|
42 | gdk_win32_symbols = -export-symbols gdk.def |
---|
43 | |
---|
44 | install-libtool-import-lib: |
---|
45 | $(INSTALL) .libs/libgdk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir) |
---|
46 | uninstall-libtool-import-lib: |
---|
47 | -rm $(DESTDIR)$(libdir)/libgdk-win32-$(GTK_API_VERSION).dll.a |
---|
48 | else |
---|
49 | install-libtool-import-lib: |
---|
50 | uninstall-libtool-import-lib: |
---|
51 | endif |
---|
52 | |
---|
53 | if MS_LIB_AVAILABLE |
---|
54 | noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib |
---|
55 | |
---|
56 | gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def |
---|
57 | lib -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@ |
---|
58 | |
---|
59 | install-ms-lib: |
---|
60 | $(INSTALL) gdk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir) |
---|
61 | |
---|
62 | uninstall-ms-lib: |
---|
63 | -rm $(DESTDIR)$(libdir)/gdk-win32-$(GTK_API_VERSION).lib |
---|
64 | else |
---|
65 | install-ms-lib: |
---|
66 | uninstall-ms-lib: |
---|
67 | endif |
---|
68 | |
---|
69 | # libtool stuff: set version and export symbols for resolving |
---|
70 | # since automake doesn't support conditionalized libsomething_la_LDFLAGS |
---|
71 | # we use the general approach here |
---|
72 | LDFLAGS = @STRIP_BEGIN@ \ |
---|
73 | @LDFLAGS@ \ |
---|
74 | -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ |
---|
75 | -export-dynamic \ |
---|
76 | -rpath $(libdir) \ |
---|
77 | $(no_undefined) \ |
---|
78 | @LIBTOOL_EXPORT_OPTIONS@ \ |
---|
79 | $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \ |
---|
80 | $(gdk_win32_symbols) \ |
---|
81 | @STRIP_END@ |
---|
82 | |
---|
83 | # |
---|
84 | # setup source file variables |
---|
85 | # |
---|
86 | # |
---|
87 | # GDK header files for public installation (non-generated) |
---|
88 | # |
---|
89 | # Note: files added here may need to be be propagated to gdk_headers in gtk/Makefile.am |
---|
90 | # |
---|
91 | gdk_public_h_sources = @STRIP_BEGIN@ \ |
---|
92 | gdk.h \ |
---|
93 | gdkcolor.h \ |
---|
94 | gdkcursor.h \ |
---|
95 | gdkdisplay.h \ |
---|
96 | gdkdnd.h \ |
---|
97 | gdkdrawable.h \ |
---|
98 | gdkevents.h \ |
---|
99 | gdkfont.h \ |
---|
100 | gdkgc.h \ |
---|
101 | gdkkeysyms.h \ |
---|
102 | gdki18n.h \ |
---|
103 | gdkimage.h \ |
---|
104 | gdkinput.h \ |
---|
105 | gdkkeys.h \ |
---|
106 | gdkdisplaymanager.h \ |
---|
107 | gdkpango.h \ |
---|
108 | gdkpixbuf.h \ |
---|
109 | gdkpixmap.h \ |
---|
110 | gdkproperty.h \ |
---|
111 | gdkregion.h \ |
---|
112 | gdkrgb.h \ |
---|
113 | gdkscreen.h \ |
---|
114 | gdkselection.h \ |
---|
115 | gdktypes.h \ |
---|
116 | gdkvisual.h \ |
---|
117 | gdkwindow.h \ |
---|
118 | @STRIP_END@ |
---|
119 | |
---|
120 | gdk_headers = @STRIP_BEGIN@ \ |
---|
121 | $(gdk_public_h_sources) \ |
---|
122 | gdkenumtypes.h \ |
---|
123 | gdkprivate.h \ |
---|
124 | @STRIP_END@ |
---|
125 | |
---|
126 | gdk_c_sources = @STRIP_BEGIN@ \ |
---|
127 | gdk.c \ |
---|
128 | gdkcolor.c \ |
---|
129 | gdkcursor.c \ |
---|
130 | gdkdisplay.c \ |
---|
131 | gdkdnd.c \ |
---|
132 | gdkdraw.c \ |
---|
133 | gdkevents.c \ |
---|
134 | gdkfont.c \ |
---|
135 | gdkgc.c \ |
---|
136 | gdkglobals.c \ |
---|
137 | gdkkeys.c \ |
---|
138 | gdkkeyuni.c \ |
---|
139 | gdkimage.c \ |
---|
140 | gdkinternals.h \ |
---|
141 | gdkintl.h \ |
---|
142 | gdkdisplaymanager.c \ |
---|
143 | gdkpango.c \ |
---|
144 | gdkpixbuf-drawable.c \ |
---|
145 | gdkpixbuf-render.c \ |
---|
146 | gdkpixmap.c \ |
---|
147 | gdkpoly-generic.h \ |
---|
148 | gdkpolyreg-generic.c \ |
---|
149 | gdkrgb.c \ |
---|
150 | gdkrectangle.c \ |
---|
151 | gdkregion-generic.c \ |
---|
152 | gdkregion-generic.h \ |
---|
153 | gdkscreen.c \ |
---|
154 | gdkselection.c \ |
---|
155 | gdkvisual.c \ |
---|
156 | gdkwindow.c \ |
---|
157 | @STRIP_END@ |
---|
158 | |
---|
159 | # |
---|
160 | # setup GDK sources and their dependancies |
---|
161 | # |
---|
162 | |
---|
163 | gdkincludedir = $(includedir)/gtk-2.0/gdk |
---|
164 | gdkinclude_HEADERS = $(gdk_headers) |
---|
165 | |
---|
166 | # gdkmarshalers.c is not here becuase it is currently an empty file |
---|
167 | common_sources = @STRIP_BEGIN@ \ |
---|
168 | $(gdk_c_sources) \ |
---|
169 | gdkenumtypes.c \ |
---|
170 | gdkmarshalers.h \ |
---|
171 | @STRIP_END@ |
---|
172 | |
---|
173 | libgdk_x11_2_0_la_SOURCES = $(common_sources) |
---|
174 | libgdk_linux_fb_2_0_la_SOURCES = $(common_sources) gdkkeynames.c |
---|
175 | libgdk_win32_2_0_la_SOURCES = $(common_sources) gdkkeynames.c |
---|
176 | |
---|
177 | libgdk_x11_2_0_la_LIBADD = x11/libgdk-x11.la @GDK_DEP_LIBS@ |
---|
178 | libgdk_linux_fb_2_0_la_LIBADD = linux-fb/libgdk-linux-fb.la @GDK_DEP_LIBS@ |
---|
179 | libgdk_win32_2_0_la_LIBADD = \ |
---|
180 | win32/libgdk-win32.la $(wintab_lib) $(ie55uuid_lib) \ |
---|
181 | @GDK_DEP_LIBS@ |
---|
182 | libgdk_win32_2_0_la_DEPENDENCIES = gdk.def |
---|
183 | |
---|
184 | lib_LTLIBRARIES = $(gdktargetlib) |
---|
185 | |
---|
186 | EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la |
---|
187 | |
---|
188 | MAINTAINERCLEANFILES = gdkenumtypes.h stamp-gdkenumtypes.h |
---|
189 | EXTRA_HEADERS = |
---|
190 | |
---|
191 | # |
---|
192 | # Rule to install gdkconfig.h header file |
---|
193 | # |
---|
194 | configexecincludedir = $(libdir)/gtk-2.0/include |
---|
195 | #configexecinclude_DATA = gdkconfig.h |
---|
196 | |
---|
197 | install-exec-local: gdkconfig.h |
---|
198 | $(mkinstalldirs) $(DESTDIR)$(configexecincludedir) |
---|
199 | file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \ |
---|
200 | if test -r $$file && cmp -s gdkconfig.h $$file; then :; \ |
---|
201 | else $(INSTALL_DATA) gdkconfig.h $$file; fi |
---|
202 | |
---|
203 | install-exec-hook: |
---|
204 | if DISABLE_EXPLICIT_DEPS |
---|
205 | $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gdktargetlib) |
---|
206 | endif |
---|
207 | |
---|
208 | #note: not gdkconfig.h |
---|
209 | BUILT_SOURCES = stamp-gc-h |
---|
210 | |
---|
211 | # Generate built header without using automake-1.4 BUILT_SOURCES |
---|
212 | $(libgdk_x11_2_0_la_OBJECTS) $(libgdk_linux_fb_2_0_la_OBJECTS) $(libgdk_win32_2_0_la_OBJECTS): gdkenumtypes.h gdkmarshalers.h |
---|
213 | |
---|
214 | $(srcdir)/gdkenumtypes.h: stamp-gdkenumtypes.h |
---|
215 | @true |
---|
216 | stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile |
---|
217 | ( cd $(srcdir) && glib-mkenums \ |
---|
218 | --fhead "#ifndef __GDK_ENUM_TYPES_H__\n#define __GDK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \ |
---|
219 | --fprod "/* enumerations from \"@filename@\" */\n" \ |
---|
220 | --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ |
---|
221 | --ftail "G_END_DECLS\n\n#endif /* __GDK_ENUM_TYPES_H__ */" \ |
---|
222 | $(gdk_public_h_sources) ) >> xgen-geth \ |
---|
223 | && (cmp -s xgen-geth $(srcdir)/gdkenumtypes.h || cp xgen-geth $(srcdir)/gdkenumtypes.h ) \ |
---|
224 | && rm -f xgen-geth \ |
---|
225 | && echo timestamp > $(@F) |
---|
226 | $(srcdir)/gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile |
---|
227 | ( cd $(srcdir) && glib-mkenums \ |
---|
228 | --fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"" \ |
---|
229 | --fprod "\n/* enumerations from \"@filename@\" */" \ |
---|
230 | --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ |
---|
231 | --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ |
---|
232 | --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ |
---|
233 | $(gdk_public_h_sources) ) > xgen-getc \ |
---|
234 | && cp xgen-getc $(srcdir)/gdkenumtypes.c \ |
---|
235 | && rm -f xgen-getc |
---|
236 | |
---|
237 | # |
---|
238 | # Marshaller generation |
---|
239 | # |
---|
240 | $(srcdir)/gdkmarshalers.h: @REBUILD@ gdkmarshalers.list |
---|
241 | cd $(srcdir) && \ |
---|
242 | ( @GLIB_GENMARSHAL@ --prefix=gdk_marshal gdkmarshalers.list --header > gdkmarshalers.tmp \ |
---|
243 | && mv gdkmarshalers.tmp gdkmarshalers.h ) \ |
---|
244 | || ( rm -f gdkmarshalers.tmp && exit 1 ) |
---|
245 | $(srcdir)/gdkmarshalers.c: @REBUILD@ gdkmarshalers.list |
---|
246 | cd $(srcdir) && \ |
---|
247 | $( @GLIB_GENMARSHAL@ --prefix=gdk_marshal gdkmarshalers.list --body > gdkmarshalers.tmp \ |
---|
248 | && mv gdkmarshalers.tmp gdkmarshalers.c ) \ |
---|
249 | || ( rm -f gdkmarshalers.tmp && exit 1 ) |
---|
250 | |
---|
251 | gdkconfig.h: stamp-gc-h |
---|
252 | @if test -f gdkconfig.h; then :; \ |
---|
253 | else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi |
---|
254 | stamp-gc-h: ../config.status |
---|
255 | cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status |
---|
256 | echo timestamp > stamp-gc-h |
---|
257 | |
---|
258 | install-data-local: install-ms-lib install-libtool-import-lib |
---|
259 | |
---|
260 | uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib |
---|
261 | |
---|
262 | .PHONY: files |
---|
263 | |
---|
264 | files: |
---|
265 | @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ |
---|
266 | echo $$p; \ |
---|
267 | done |
---|