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