[SLP Merge] 2011/7/18 16:11
[framework/uifw/elementary.git] / src / examples / Makefile.am
1 MAINTAINERCLEANFILES = Makefile.in
2
3 .PHONY: screenshots
4
5 pkglibdir = $(datadir)/$(PACKAGE)/examples
6
7 AM_CPPFLAGS = \
8 -I. \
9 -I$(top_srcdir)/src/lib \
10 -I$(top_builddir)/src/lib \
11 -DPACKAGE_DATA_DIR="\"$(datadir)/elementary\"" \
12 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
13 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
14 @ELEMENTARY_EDBUS_CFLAGS@ \
15 @ELEMENTARY_EFREET_CFLAGS@ \
16 @ELEMENTARY_ETHUMB_CFLAGS@ \
17 @ELEMENTARY_CFLAGS@
18
19 LDADD = \
20         @ELEMENTARY_LIBS@ \
21         $(top_builddir)/src/lib/libelementary.la
22
23 EDJE_CC = @edje_cc@
24 EDJE_FLAGS_VERBOSE_ =
25 EDJE_FLAGS_VERBOSE_0 =
26 EDJE_FLAGS_VERBOSE_1 = -v
27 EDJE_FLAGS = $(EDJE_FLAGS_$(V))
28
29 SRCS = \
30         actionslider_example_01.c \
31         anchorblock_example_01.c \
32         animator_example_01.c \
33         bubble_example_01.c \
34         button_example_01.c \
35         check_example_01.c \
36         colorselector_example_01.c
37         frame_example_01.c \
38         transit_example_01.c \
39         transit_example_02.c \
40         transit_example_03.c \
41         transit_example_04.c \
42         bg_example_01.c \
43         bg_example_02.c \
44         bg_example_03.c \
45         box_example_02.c \
46         general_funcs_example.c \
47         theme_example_01.c \
48         theme_example_02.c \
49         clock_example.c \
50         theme_example.edc
51
52 pkglib_PROGRAMS =
53
54 if EFL_INSTALL_EXAMPLES
55 filesdir = $(datadir)/$(PACKAGE)/examples
56 files_DATA = $(SRCS)
57 endif
58
59 if EFL_BUILD_EXAMPLES
60 theme_example.edj: Makefile theme_example.edc
61         $(EDJE_CC) $(EDJE_FLAGS) \
62         $(top_srcdir)/src/examples/theme_example.edc \
63         $(top_builddir)/src/examples/theme_example.edj
64
65 clean-local:
66         rm -f *.edj
67
68 pkglib_PROGRAMS += \
69         actionslider_example_01 \
70         anchorblock_example_01 \
71         animator_example_01 \
72         bubble_example_01 \
73         button_example_01 \
74         check_example_01 \
75         colorselector_example_01 \
76         frame_example_01 \
77         transit_example_01 \
78         transit_example_02 \
79         transit_example_03 \
80         transit_example_04 \
81         bg_example_01 \
82         bg_example_02 \
83         bg_example_03 \
84         box_example_02 \
85         general_funcs_example \
86         theme_example_01 \
87         theme_example_02 \
88         clock_example \
89         flipselector_example \
90         theme_example.edj
91
92 # This variable will hold the list of screenshots that will be made
93 # by "make screenshots". Each item in the list is of the form:
94 # <example executable>:<screenshot filename>:<delay in seconds>
95 SCREENSHOTS = \
96         actionslider_example_01:actionslider_01.png:0.0 \
97         bg_example_02:bg_01.png:0.0 \
98         box_example_02:box_example_02.png:1.3 \
99         bubble_example_01:bubble_example_01.png:0.0 \
100         button_example_01:button_01.png:0.0 \
101         check_example_01:check_example_01.png:0.0 \
102         colorselector_example_01:colorselector_example_01.png:0.0 \
103         animator_example_01:animator_example_01.png:0.2 \
104         animator_example_01:animator_example_02.png:0.5 \
105         animator_example_01:animator_example_03.png:0.9 \
106         frame_example_01:frame_example_01.png:0.0 \
107         theme_example_01:theme_example_01.png:0.0 \
108         clock_example:clock_example.png:0.5 \
109         flipselector_example:flipselector_example.png:0.0
110
111 screenshots: all
112         @mkdir -p $(top_srcdir)/doc/img/screenshots
113         @for ss in $(SCREENSHOTS); do \
114                 SS_ENTRY=($${ss//:/ }) ; \
115                 EXAMPLE=$${SS_ENTRY[0]} ; \
116                 SS_FILE=$${SS_ENTRY[1]} ; \
117                 SS_DELAY=$${SS_ENTRY[2]} ; \
118                 ELM_ENGINE="shot:delay=$${SS_DELAY}:file=$(top_srcdir)/doc/img/screenshots/$${SS_FILE}" ./$${EXAMPLE} ; \
119                 convert $(top_srcdir)/doc/img/screenshots/$${SS_FILE} $(top_srcdir)/doc/img/screenshots/$${SS_FILE/.png/.eps} ; \
120         done
121
122 else
123
124 screenshots:
125         @echo "Examples are not built. Run \"./configure --enable-build-examples\" first."
126
127 endif