Makefile.am 8.14 KB
Newer Older
Tim Janik's avatar
Tim Janik committed
1
### Process this file with automake to produce Makefile.in
Elliot Lee's avatar
Elliot Lee committed
2 3

gtkincludedir = $(includedir)/gtk
4
DEFS += -DG_LOG_DOMAIN=\"Gtk\"
Elliot Lee's avatar
Elliot Lee committed
5

6
lib_LTLIBRARIES = libgtk.la
Elliot Lee's avatar
Elliot Lee committed
7

8
static_sources = \
Tim Janik's avatar
Tim Janik committed
9 10
	gtkaccelgroup.c		\
	gtkaccellabel.c		\
Elliot Lee's avatar
Elliot Lee committed
11 12
	gtkadjustment.c		\
	gtkalignment.c		\
13
	gtkarg.c		\
Elliot Lee's avatar
Elliot Lee committed
14
	gtkarrow.c		\
15
	gtkaspectframe.c	\
Elliot Lee's avatar
Elliot Lee committed
16
	gtkbin.c		\
Tim Janik's avatar
Tim Janik committed
17
	gtkbindings.c		\
Elliot Lee's avatar
Elliot Lee committed
18 19 20
	gtkbbox.c		\
	gtkbox.c		\
	gtkbutton.c		\
21
	gtkcalendar.c		\
Elliot Lee's avatar
Elliot Lee committed
22 23
	gtkcheckbutton.c	\
	gtkcheckmenuitem.c	\
24
	gtkclist.c		\
Elliot Lee's avatar
Elliot Lee committed
25
	gtkcolorsel.c		\
26
	gtkcombo.c		\
Elliot Lee's avatar
Elliot Lee committed
27
	gtkcontainer.c		\
28
	gtkctree.c		\
Elliot Lee's avatar
Elliot Lee committed
29 30 31
	gtkcurve.c		\
	gtkdata.c		\
	gtkdialog.c		\
32
	gtkdnd.c		\
Elliot Lee's avatar
Elliot Lee committed
33
	gtkdrawingarea.c	\
34
	gtkdrawwindow.c         \
35
	gtkeditable.c           \
Elliot Lee's avatar
Elliot Lee committed
36 37 38 39
	gtkentry.c		\
	gtkeventbox.c		\
	gtkfilesel.c		\
	gtkfixed.c		\
40
	gtkfontsel.c            \
Elliot Lee's avatar
Elliot Lee committed
41 42 43
	gtkframe.c		\
	gtkgamma.c		\
	gtkgc.c			\
scott's avatar
scott committed
44
	gtkhandlebox.c		\
Elliot Lee's avatar
Elliot Lee committed
45 46 47 48 49 50 51 52 53
	gtkhbbox.c		\
	gtkhbox.c		\
	gtkhpaned.c		\
	gtkhruler.c		\
	gtkhscale.c		\
	gtkhscrollbar.c		\
	gtkhseparator.c		\
	gtkimage.c		\
	gtkinputdialog.c	\
54
	gtkinvisible.c		\
Elliot Lee's avatar
Elliot Lee committed
55
	gtkitem.c		\
Tim Janik's avatar
Tim Janik committed
56
	gtkitemfactory.c	\
Elliot Lee's avatar
Elliot Lee committed
57 58 59 60 61 62 63 64 65 66 67 68 69
	gtklabel.c		\
	gtklist.c		\
	gtklistitem.c		\
	gtkmain.c		\
	gtkmenu.c		\
	gtkmenubar.c		\
	gtkmenufactory.c	\
	gtkmenuitem.c		\
	gtkmenushell.c		\
	gtkmisc.c		\
	gtknotebook.c		\
	gtkobject.c		\
	gtkoptionmenu.c		\
CDT 1998 Shawn T. Amundson's avatar
CDT 1998 Shawn T. Amundson committed
70
	gtkpacker.c		\
Elliot Lee's avatar
Elliot Lee committed
71 72 73
	gtkpaned.c		\
	gtkpixmap.c		\
	gtkpreview.c		\
74
	gtkprogress.c		\
Elliot Lee's avatar
Elliot Lee committed
75 76 77 78 79 80 81 82 83 84 85 86
	gtkprogressbar.c	\
	gtkradiobutton.c	\
	gtkradiomenuitem.c	\
	gtkrange.c		\
	gtkrc.c			\
	gtkruler.c		\
	gtkscale.c		\
	gtkscrollbar.c		\
	gtkscrolledwindow.c	\
	gtkselection.c		\
	gtkseparator.c		\
	gtksignal.c		\
87
	gtkspinbutton.c		\
Elliot Lee's avatar
Elliot Lee committed
88
	gtkstyle.c		\
Shawn Amundson's avatar
Shawn Amundson committed
89
	gtkstatusbar.c		\
Elliot Lee's avatar
Elliot Lee committed
90
	gtktable.c		\
91
	gtktearoffmenuitem.c    \
Elliot Lee's avatar
Elliot Lee committed
92
	gtktext.c		\
93
	gtkthemes.c		\
94
	gtktipsquery.c		\
Elliot Lee's avatar
Elliot Lee committed
95
	gtktogglebutton.c	\
96
	gtktoolbar.c		\
Elliot Lee's avatar
Elliot Lee committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
	gtktooltips.c		\
	gtktree.c		\
	gtktreeitem.c		\
	gtktypeutils.c		\
	gtkvbbox.c		\
	gtkvbox.c		\
	gtkviewport.c		\
	gtkvpaned.c		\
	gtkvruler.c		\
	gtkvscale.c		\
	gtkvscrollbar.c		\
	gtkvseparator.c		\
	gtkwidget.c		\
	gtkwindow.c		\
	fnmatch.c		\
	fnmatch.h

114 115 116 117
libgtk_la_SOURCES = \
	$(static_sources)	\
	gtkmarshal.c

118 119
# Source headers are are non-autogenerated headers
source_headers = \
Elliot Lee's avatar
Elliot Lee committed
120
	gtk.h			\
Tim Janik's avatar
Tim Janik committed
121 122
	gtkaccelgroup.h		\
	gtkaccellabel.h		\
Elliot Lee's avatar
Elliot Lee committed
123 124
	gtkadjustment.h		\
	gtkalignment.h		\
125
	gtkarg.h		\
Elliot Lee's avatar
Elliot Lee committed
126
	gtkarrow.h		\
127
	gtkaspectframe.h	\
Elliot Lee's avatar
Elliot Lee committed
128
	gtkbin.h		\
Tim Janik's avatar
Tim Janik committed
129
	gtkbindings.h		\
Elliot Lee's avatar
Elliot Lee committed
130 131 132
	gtkbbox.h		\
	gtkbox.h		\
	gtkbutton.h		\
133
	gtkcalendar.h		\
Elliot Lee's avatar
Elliot Lee committed
134 135
	gtkcheckbutton.h	\
	gtkcheckmenuitem.h	\
136
	gtkclist.h		\
Elliot Lee's avatar
Elliot Lee committed
137
	gtkcolorsel.h		\
138
	gtkcombo.h		\
Elliot Lee's avatar
Elliot Lee committed
139
	gtkcontainer.h		\
140
	gtkctree.h		\
Elliot Lee's avatar
Elliot Lee committed
141 142
	gtkcurve.h		\
	gtkdata.h		\
143
	gtkdebug.h              \
Elliot Lee's avatar
Elliot Lee committed
144
	gtkdialog.h		\
145
	gtkdnd.h		\
Elliot Lee's avatar
Elliot Lee committed
146
	gtkdrawingarea.h	\
147
	gtkdrawwindow.h         \
148
	gtkeditable.h           \
Elliot Lee's avatar
Elliot Lee committed
149 150 151 152 153
	gtkentry.h		\
	gtkenums.h		\
	gtkeventbox.h		\
	gtkfilesel.h		\
	gtkfixed.h		\
154
	gtkfontsel.h		\
Elliot Lee's avatar
Elliot Lee committed
155 156 157
	gtkframe.h		\
	gtkgamma.h		\
	gtkgc.h			\
158
	gtkhandlebox.h		\
Elliot Lee's avatar
Elliot Lee committed
159 160 161 162 163 164 165 166 167
	gtkhbbox.h		\
	gtkhbox.h		\
	gtkhpaned.h		\
	gtkhruler.h		\
	gtkhscale.h		\
	gtkhscrollbar.h		\
	gtkhseparator.h		\
	gtkimage.h		\
	gtkinputdialog.h	\
168
	gtkinvisible.h		\
Elliot Lee's avatar
Elliot Lee committed
169
	gtkitem.h		\
Tim Janik's avatar
Tim Janik committed
170
	gtkitemfactory.h	\
Elliot Lee's avatar
Elliot Lee committed
171 172 173 174 175 176 177 178 179 180 181 182 183
	gtklabel.h		\
	gtklist.h		\
	gtklistitem.h		\
	gtkmain.h		\
	gtkmenu.h		\
	gtkmenubar.h		\
	gtkmenufactory.h	\
	gtkmenuitem.h		\
	gtkmenushell.h		\
	gtkmisc.h		\
	gtknotebook.h		\
	gtkobject.h		\
	gtkoptionmenu.h		\
CDT 1998 Shawn T. Amundson's avatar
CDT 1998 Shawn T. Amundson committed
184
	gtkpacker.h		\
Elliot Lee's avatar
Elliot Lee committed
185 186 187
	gtkpaned.h		\
	gtkpixmap.h		\
	gtkpreview.h		\
188
	gtkprivate.h		\
189
	gtkprogress.h		\
Elliot Lee's avatar
Elliot Lee committed
190 191 192 193 194 195 196 197 198 199 200 201
	gtkprogressbar.h	\
	gtkradiobutton.h	\
	gtkradiomenuitem.h	\
	gtkrange.h		\
	gtkrc.h			\
	gtkruler.h		\
	gtkscale.h		\
	gtkscrollbar.h		\
	gtkscrolledwindow.h	\
	gtkselection.h		\
	gtkseparator.h		\
	gtksignal.h		\
202
	gtkspinbutton.h		\
Elliot Lee's avatar
Elliot Lee committed
203
	gtkstyle.h		\
Shawn Amundson's avatar
Shawn Amundson committed
204
	gtkstatusbar.h		\
Elliot Lee's avatar
Elliot Lee committed
205
	gtktable.h		\
206
	gtktearoffmenuitem.h    \
Elliot Lee's avatar
Elliot Lee committed
207
	gtktext.h		\
208
	gtkthemes.h		\
209
	gtktipsquery.h		\
Elliot Lee's avatar
Elliot Lee committed
210
	gtktogglebutton.h	\
211
	gtktoolbar.h		\
Elliot Lee's avatar
Elliot Lee committed
212 213 214 215 216 217 218 219 220 221 222 223 224
	gtktooltips.h		\
	gtktree.h		\
	gtktreeitem.h		\
	gtktypeutils.h		\
	gtkvbbox.h		\
	gtkvbox.h		\
	gtkviewport.h		\
	gtkvpaned.h		\
	gtkvruler.h		\
	gtkvscale.h		\
	gtkvscrollbar.h		\
	gtkvseparator.h		\
	gtkwidget.h		\
225 226 227 228
	gtkwindow.h

gtkinclude_HEADERS = 		\
	$(source_headers) 	\
229
	gtkfeatures.h		\
230
	gtkmarshal.h		\
Elliot Lee's avatar
Elliot Lee committed
231 232
	gtktypebuiltins.h

233
# note gtk.defs and gtkmarshal.[ch] aren't here, but their stamps are
234
BUILT_SOURCES = \
235 236 237 238 239 240
	stamp-d				\
	stamp-m				\
	gtktypebuiltins.h		\
	gtktypebuiltins_evals.c		\
	gtktypebuiltins_ids.c		\
        gtktypebuiltins_vars.c
241

242
# cause the built sources to be rebuild when possible, even with --include-deps
243
$(static_sources): $(BUILT_SOURCES)
244

245 246
# More headers to use when autogenerating.
gdk_headers = \
247 248
	../gdk/gdktypes.h \
	../gdk/gdkrgb.h
249 250

# generate gtk.defs file from gtk-boxed.defs and *.h
251 252 253
gtk.defs: @REBUILD@ stamp-d
	@:
stamp-d: @REBUILD@ makeenums.pl gtk-boxed.defs $(source_headers) $(gdk_headers)
254
	cd $(srcdir) \
255
	&& $(PERL) makeenums.pl defs $(source_headers) $(gdk_headers) > s-gd \
256
	&& cat gtk-boxed.defs >> s-gd \
257 258
	&& (cmp -s s-gd gtk.defs || mv s-gd gtk.defs) && rm -f s-gd \
	&& echo timestamp > stamp-d
Elliot Lee's avatar
Elliot Lee committed
259

260
# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
261
gtktypebuiltins.h: @REBUILD@ gtk.defs maketypes.awk
262
	cd $(srcdir) \
263
	&& $(AWK) -f maketypes.awk gtk.defs macros > s-gtb \
264
	&& mv s-gtb gtktypebuiltins.h
265 266

# generate type identifier variables (GTK_TYPE_WIDGET_FLAGS)
267
gtktypebuiltins_vars.c: @REBUILD@ gtk.defs maketypes.awk
268
	cd $(srcdir) \
269
	&& $(AWK) -f maketypes.awk gtk.defs variables > s-gtbv \
270
	&& mv s-gtbv gtktypebuiltins_vars.c
Elliot Lee's avatar
Elliot Lee committed
271

272
# generate type entries for type-id registration
273
gtktypebuiltins_ids.c: @REBUILD@ gtk.defs maketypes.awk
274
	cd $(srcdir) \
275
	&& $(AWK) -f maketypes.awk gtk.defs entries > s-gtbi \
276
	&& mv s-gtbi gtktypebuiltins_ids.c 
277

278
# generate enum value arrays
279
gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl gtk.defs
280
	cd $(srcdir) \
281 282
	&& $(PERL) makeenums.pl arrays $(source_headers) $(gdk_headers) > \
	s-gtbe \
283
	&& mv s-gtbe gtktypebuiltins_evals.c
Tim Janik's avatar
Tim Janik committed
284

285 286 287 288 289 290 291
gtkmarshal.c gtkmarshal.h: @REBUILD@ stamp-m
	@:
stamp-m: @REBUILD@ gtkmarshal.list genmarshal.pl
	srcdir=$(srcdir) INDENT=$(INDENT) $(PERL) $(srcdir)/genmarshal.pl \
	&& (cmp -s s-gmc gtkmarshal.c || mv s-gmc gtkmarshal.c) && rm -f s-gmc \
	&& (cmp -s s-gmh gtkmarshal.h || mv s-gmh gtkmarshal.h) && rm -f s-gmh \
	&& echo timestamp > stamp-m
292

293 294
libgtk_la_LDFLAGS = \
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE)
Elliot Lee's avatar
Elliot Lee committed
295

296 297 298 299 300 301 302 303 304 305
# We create a dummy theme for the default GTK+ theme

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk
	echo "# Empty gtkrc for default theme" > \
	    $(DESTDIR)$(datadir)/themes/Default/gtk/gtkrc

uninstall-local:
	rm -f $(DESTDIR)$(datadir)/themes/Default/gtkrc

Elliot Lee's avatar
Elliot Lee committed
306 307 308
EXTRA_DIST = \
	line-arrow.xbm 		\
	line-wrap.xbm 		\
Tim Janik's avatar
Tim Janik committed
309
	testgtk.1 		\
Elliot Lee's avatar
Elliot Lee committed
310
	testgtkrc 		\
311
	testgtkrc2 		\
312
	gtkfeatures.h.in	\
Tim Janik's avatar
Tim Janik committed
313
	makeenums.pl		\
314
	makeenums.awk		\
315
	maketypes.awk		\
316
	makeenums.h		\
317
	gtkargcollector.c	\
318 319 320
	gtktypebuiltins_vars.c	\
	gtktypebuiltins_ids.c	\
	gtktypebuiltins_evals.c	\
321 322
	gtk-boxed.defs		\
	gtk.defs		\
Tim Janik's avatar
Tim Janik committed
323 324
	genmarshal.pl		\
	gtkmarshal.list		\
Elliot Lee's avatar
Elliot Lee committed
325 326 327 328
	test.xpm		\
	marble.xpm		\
	3DRings.xpm		\
	FilesQueue.xpm		\
329 330 331 332
	Modeller.xpm		\
	tree_plus.xpm		\
	tree_minus.xpm		\
	tree_plus.xbm		\
333 334
	tree_minus.xbm          \
        circles.xbm
Elliot Lee's avatar
Elliot Lee committed
335

336 337 338 339
INCLUDES = \
	-DGTK_EXE_PREFIX=\"$(exec_prefix)\"   \
	-DGTK_DATA_PREFIX=\"$(prefix)\"   \
	-I$(top_srcdir) @GLIB_CFLAGS@ @x_cflags@
Elliot Lee's avatar
Elliot Lee committed
340

341 342
noinst_PROGRAMS = testgtk testinput testselection testthreads testrgb testdnd simple 

Tim Janik's avatar
Tim Janik committed
343
DEPS =	\
344 345
	libgtk.la					\
	$(top_builddir)/gdk/libgdk.la
Owen Taylor's avatar
Owen Taylor committed
346

Tim Janik's avatar
Tim Janik committed
347
LDADDS = \
348 349
	libgtk.la					\
	$(top_builddir)/gdk/libgdk.la			\
Tim Janik's avatar
Tim Janik committed
350 351
	@x_ldflags@					\
	@x_libs@					\
Owen Taylor's avatar
Owen Taylor committed
352
	@GLIB_LIBS@                                     \
Elliot Lee's avatar
Elliot Lee committed
353 354 355 356
	-lm

testgtk_DEPENDENCIES = $(DEPS)
testinput_DEPENDENCIES = $(DEPS)
Owen Taylor's avatar
Owen Taylor committed
357
testthreads_DEPENDENCIES = $(DEPS)
Elliot Lee's avatar
Elliot Lee committed
358
testselection_DEPENDENCIES = $(DEPS)
359
testrgb_DEPENDENCIES = $(DEPS)
360
testdnd_DEPENDENCIES = $(DEPS)
Elliot Lee's avatar
Elliot Lee committed
361 362
simple_DEPENDENCIES = $(DEPS)

Tim Janik's avatar
Tim Janik committed
363 364
testgtk_LDADD = $(LDADDS)
testinput_LDADD = $(LDADDS)
Owen Taylor's avatar
Owen Taylor committed
365
testthreads_LDADD = $(LDADDS)
Tim Janik's avatar
Tim Janik committed
366
testselection_LDADD = $(LDADDS)
367
testrgb_LDADD = $(LDADDS)
368
testdnd_LDADD = $(LDADDS)
Tim Janik's avatar
Tim Janik committed
369 370
simple_LDADD = $(LDADDS)

371
.PHONY: files test test-debug
Elliot Lee's avatar
Elliot Lee committed
372 373 374 375 376

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done
377 378

test: testgtk
379 380 381
	builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; \
	cd $$builddir; cd $(srcdir); \
	$(SHELL) $$top_builddir/libtool --mode=execute $$builddir/testgtk
382 383

test-debug: testgtk
384 385 386
	builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; \
	cd $$builddir; cd $(srcdir); \
	$(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtk