3833b71587be13caaa0e50caa4ef7cf5e5701b9c
[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         button_example_01.c \
34         transit_example_01.c \
35         transit_example_02.c \
36         transit_example_03.c \
37         transit_example_04.c \
38         bg_example_01.c \
39         bg_example_02.c \
40         bg_example_03.c \
41         general_funcs_example.c \
42         theme_example_01.c \
43         theme_example_02.c \
44         theme_example.edc
45
46 pkglib_PROGRAMS =
47
48 if EFL_INSTALL_EXAMPLES
49 filesdir = $(datadir)/$(PACKAGE)/examples
50 files_DATA = $(SRCS)
51 endif
52
53 if EFL_BUILD_EXAMPLES
54 theme_example.edj: Makefile theme_example.edc
55         $(EDJE_CC) $(EDJE_FLAGS) \
56         $(top_srcdir)/src/examples/theme_example.edc \
57         $(top_builddir)/src/examples/theme_example.edj
58
59 clean-local:
60         rm -f *.edj
61
62 pkglib_PROGRAMS += \
63         actionslider_example_01 \
64         anchorblock_example_01 \
65         animator_example_01 \
66         button_example_01 \
67         transit_example_01 \
68         transit_example_02 \
69         transit_example_03 \
70         transit_example_04 \
71         bg_example_01 \
72         bg_example_02 \
73         bg_example_03 \
74         general_funcs_example \
75         theme_example_01 \
76         theme_example_02 \
77         theme_example.edj
78
79 # This variable will hold the list of screenshots that will be made
80 # by "make screenshots". Each item in the list is of the form:
81 # <example executable>:<screenshot filename>:<delay in seconds>
82 SCREENSHOTS = \
83         actionslider_example_01:actionslider_01.png:0.0 \
84         bg_example_02:bg_01.png:0.0 \
85         button_example_01:button_01.png:0.0 \
86         animator_example_01:animator_example_01.png:0.2 \
87         animator_example_01:animator_example_02.png:0.5 \
88         animator_example_01:animator_example_03.png:0.9 \
89         theme_example_01:theme_example_01.png:0.0
90
91 screenshots: all
92         @mkdir -p $(top_srcdir)/doc/img/screenshots
93         @for ss in $(SCREENSHOTS); do \
94                 SS_ENTRY=($${ss//:/ }) ; \
95                 EXAMPLE=$${SS_ENTRY[0]} ; \
96                 SS_FILE=$${SS_ENTRY[1]} ; \
97                 SS_DELAY=$${SS_ENTRY[2]} ; \
98                 ELM_ENGINE="shot:delay=$${SS_DELAY}:file=$(top_srcdir)/doc/img/screenshots/$${SS_FILE}" ./$${EXAMPLE} ; \
99                 convert $(top_srcdir)/doc/img/screenshots/$${SS_FILE} $(top_srcdir)/doc/img/screenshots/$${SS_FILE/.png/.eps} ; \
100         done
101
102 else
103
104 screenshots:
105         @echo "Examples are not built. Run \"./configure --enable-build-examples\" first."
106
107 endif