]> Pileus Git - ~andy/gtk/blob - demos/Makefile.am
Fix up linker flags
[~andy/gtk] / demos / Makefile.am
1 ## Makefile.am for gtk+/demos
2 include $(top_srcdir)/Makefile.decl
3
4 SUBDIRS = gtk-demo
5
6 INCLUDES =                              \
7         -I$(top_srcdir)                 \
8         -I$(top_builddir)/gdk           \
9         -DGDK_DISABLE_DEPRECATED        \
10         -DGTK_DISABLE_DEPRECATED        \
11         $(GTK_DEBUG_FLAGS)              \
12         $(GTK_DEP_CFLAGS)
13
14 DEPS =                                                                  \
15         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
16         $(top_builddir)/gdk/$(gdktargetlib)                             \
17         $(top_builddir)/gtk/$(gtktargetlib)
18
19 LDADDS =                                                                \
20         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
21         $(top_builddir)/gdk/$(gdktargetlib)                             \
22         $(top_builddir)/gtk/$(gtktargetlib)                             \
23         $(GTK_DEP_LIBS)                                                 \
24         $(MATH_LIB)
25
26 noinst_PROGRAMS =               \
27         testpixbuf-drawable     \
28         testanimation           \
29         testpixbuf-color        \
30         testpixbuf-save         \
31         testpixbuf-scale        \
32         pixbuf-demo
33
34 # Need to build test-inline-pixbufs.h for testpixbuf
35 if HAVE_PNG
36 noinst_PROGRAMS += testpixbuf
37 BUILT_SOURCES = test-inline-pixbufs.h
38 endif
39
40 if CROSS_COMPILING
41 pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
42 pixbuf_csource_deps=
43 else
44 pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource
45 pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders 
46 endif
47
48 test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
49         $(pixbuf_csource) --raw --build-list            \
50                 apple_red  $(srcdir)/apple-red.png      \
51                 gnome_foot $(srcdir)/gnome-foot.png     \
52         > test-inline-pixbufs.h                         \
53         || (rm -f test-inline-pixbufs.h && false)
54
55 testpixbuf_DEPENDENCIES = $(DEPS)
56 testpixbuf_drawable_DEPENDENCIES = $(DEPS)
57 testpixbuf_save_DEPENDENCIES = $(DEPS)
58 testpixbuf_color_DEPENDENCIES = $(DEPS)
59 testpixbuf_scale_DEPENDENCIES = $(DEPS)
60 testanimation_DEPENDENCIES = $(DEPS)
61 pixbuf_demo_DEPENDENCIES = $(DEPS)
62
63 testpixbuf_LDADD = $(LDADDS)
64 testpixbuf_drawable_LDADD = $(LDADDS)
65 testpixbuf_save_LDADD = $(LDADDS)
66 testpixbuf_color_LDADD = $(LDADDS)
67 testpixbuf_scale_LDADD = $(LDADDS)
68 testanimation_LDADD = $(LDADDS)
69 pixbuf_demo_LDADD = $(LDADDS)
70
71 testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
72 testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
73 testpixbuf_save_SOURCES = testpixbuf-save.c
74 testpixbuf_color_SOURCES = testpixbuf-color.c
75 testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
76 testanimation_SOURCES = testanimation.c pixbuf-init.c
77 pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
78
79 EXTRA_DIST +=                   \
80         apple-red.png           \
81         background.jpg          \
82         gnome-applets.png       \
83         gnome-calendar.png      \
84         gnome-foot.png          \
85         gnome-gimp.png          \
86         gnome-gmush.png         \
87         gnome-gsame.png         \
88         gnu-keys.png
89
90 DISTCLEANFILES = test-inline-pixbufs.h
91
92 -include $(top_srcdir)/git.mk