summaryrefslogtreecommitdiff
path: root/src/Makefile_Ector.am
blob: ccd96d14d127020ebab2ea41aca506869feaab09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

### Library
ector_eolian_files_generic = \
	lib/ector/ector_surface.eo \
	lib/ector/ector_buffer.eo \
	lib/ector/ector_renderer.eo \
	lib/ector/ector_renderer_shape.eo \
	lib/ector/ector_renderer_gradient.eo \
	lib/ector/ector_renderer_gradient_radial.eo \
	lib/ector/ector_renderer_gradient_linear.eo
ector_eolian_generic_h = $(ector_eolian_files_generic:%.eo=%.eo.h)

# Handle cairo backend
ector_eolian_files_cairo = \
	lib/ector/cairo/ector_cairo_surface.eo \
	lib/ector/cairo/ector_cairo_software_surface.eo \
	lib/ector/cairo/ector_renderer_cairo.eo \
	lib/ector/cairo/ector_renderer_cairo_shape.eo \
	lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo \
	lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo
ector_eolian_cairo_h = $(ector_eolian_files_cairo:%.eo=%.eo.h)

# Handle default software backend
ector_eolian_files_software = \
	lib/ector/software/ector_software_surface.eo \
	lib/ector/software/ector_software_buffer.eo \
	lib/ector/software/ector_software_buffer_base.eo \
	lib/ector/software/ector_renderer_software.eo \
	lib/ector/software/ector_renderer_software_shape.eo \
	lib/ector/software/ector_renderer_software_gradient_radial.eo \
	lib/ector/software/ector_renderer_software_gradient_linear.eo
ector_eolian_software_h = $(ector_eolian_files_software:%.eo=%.eo.h)

# Handle gl backend
ector_eolian_files_gl = \
	lib/ector/gl/ector_gl_surface.eo \
	lib/ector/gl/ector_gl_buffer.eo \
	lib/ector/gl/ector_renderer_gl.eo \
	lib/ector/gl/ector_renderer_gl_shape.eo \
	lib/ector/gl/ector_renderer_gl_gradient_radial.eo \
	lib/ector/gl/ector_renderer_gl_gradient_linear.eo
ector_eolian_gl_h = $(ector_eolian_files_gl:%.eo=%.eo.h)

ector_eolian_type_files = \
    lib/ector/ector_types.eot

ector_eolian_files = \
                     $(ector_eolian_files_generic) \
                     $(ector_eolian_files_cairo) \
                     $(ector_eolian_files_software) \
                     $(ector_eolian_files_gl)

ector_eolian_c = $(ector_eolian_files:%.eo=%.eo.c)
ector_eolian_h = $(ector_eolian_files:%.eo=%.eo.h) \
                 $(ector_eolian_type_files:%.eot=%.eot.h)

BUILT_SOURCES += \
	$(ector_eolian_c) \
	$(ector_eolian_h)

ectoreolianfilesdir = $(datadir)/eolian/include/ector-@VMAJ@
ectoreolianfiles_DATA = $(ector_eolian_files) $(ector_eolian_type_files)

EXTRA_DIST2 += $(ectoreolianfiles_DATA) \
lib/ector/Ector.h \
lib/ector/ector_util.h \
lib/ector/ector_surface.h \
lib/ector/ector_buffer.h \
lib/ector/ector_renderer.h \
lib/ector/cairo/Ector_Cairo.h \
lib/ector/software/Ector_Software.h \
lib/ector/gl/Ector_GL.h

lib_LTLIBRARIES += lib/ector/libector.la

# And the generic implementation

lib_ector_libector_la_SOURCES = \
lib/ector/ector_main.c \
lib/ector/ector_gl_internal.h \
lib/ector/ector_buffer.c \
lib/ector/ector_renderer_shape.c \
lib/ector/ector_renderer.c \
lib/ector/ector_renderer_gradient.c \
lib/ector/ector_renderer_gradient_radial.c \
lib/ector/ector_renderer_gradient_linear.c

# And now the cairo backend
lib_ector_libector_la_SOURCES += \
lib/ector/cairo/ector_renderer_cairo_gradient_linear.c \
lib/ector/cairo/ector_renderer_cairo_gradient_radial.c \
lib/ector/cairo/ector_renderer_cairo_shape.c \
lib/ector/cairo/ector_renderer_cairo.c \
lib/ector/cairo/ector_cairo_software_surface.c \
lib/ector/cairo/ector_cairo_surface.c

# SW draw static lib
lib_ector_libector_la_SOURCES += \
static_libs/draw/draw_main_sse2.c \
static_libs/draw/draw_main.c \
static_libs/draw/draw_main_neon.c \
static_libs/rg_etc/rg_etc1.c \
static_libs/rg_etc/rg_etc2.c \
static_libs/rg_etc/rg_etc1.h \
static_libs/rg_etc/etc2_encoder.c

# Triangulator static lib
triangulator_sources = \
static_libs/triangulator/triangulator_stroker.c \
static_libs/triangulator/triangulator_stroker.h \
static_libs/triangulator/triangulator_simple.c \
static_libs/triangulator/triangulator_simple.h \
$(NULL)

# And the default software backend
lib_ector_libector_la_SOURCES += \
lib/ector/software/ector_renderer_software_gradient_linear.c \
lib/ector/software/ector_renderer_software_gradient_radial.c \
lib/ector/software/ector_renderer_software_shape.c \
lib/ector/software/ector_software_gradient.c \
lib/ector/software/ector_software_gradient_sse3.c \
lib/ector/software/ector_software_gradient.h \
lib/ector/software/ector_software_rasterizer.c \
lib/ector/software/ector_software_surface.c \
lib/ector/software/ector_software_buffer.c \
static_libs/freetype/sw_ft_math.c \
static_libs/freetype/sw_ft_raster.c \
static_libs/freetype/sw_ft_stroker.c \
$(triangulator_sources)

# And now the gl backend
lib_ector_libector_la_SOURCES += \
lib/ector/gl/ector_renderer_gl_gradient_linear.c \
lib/ector/gl/ector_renderer_gl_gradient_radial.c \
lib/ector/gl/ector_renderer_gl_shape.c \
lib/ector/gl/ector_renderer_gl.c \
lib/ector/gl/ector_gl_buffer.c \
lib/ector/gl/ector_gl_surface.c \
lib/ector/gl/ector_gl_private.h \
lib/ector/gl/shader/ector_gl_shaders.x \
lib/ector/gl/ector_gl_shader.c

ECTOR_GL_SHADERS_GEN = \
lib/ector/gl/shader/gen_shaders.sh \
lib/ector/gl/shader/fragment.glsl \
lib/ector/gl/shader/vertex.glsl \
lib/ector/gl/shader/include.glsl

lib/ector/gl/shader/ector_gl_shaders.x: $(ECTOR_GL_SHADERS_GEN)
	@echo "  SHADERS  $@"
	@sh $(srcdir)/lib/ector/gl/shader/gen_shaders.sh

lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_builddir)/src/lib \
-I$(top_builddir)/src/lib/ector \
-I$(top_builddir)/src/lib/ector/cairo \
-I$(top_builddir)/src/lib/ector/software \
-I$(top_builddir)/src/lib/ector/gl \
-I$(top_srcdir)/src/static_libs/freetype \
-I$(top_srcdir)/src/static_libs/draw \
-I$(top_srcdir)/src/static_libs/triangulator \
@ECTOR_CFLAGS@ \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \
@VALGRIND_CFLAGS@ \
@SSE3_CFLAGS@

lib_ector_libector_la_LIBADD = @ECTOR_LIBS@
lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@
lib_ector_libector_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@

### Unit tests

if EFL_ENABLE_TESTS

check_PROGRAMS += tests/ector/suite/ector_suite tests/ector/cxx_compile_test/cxx_compile_test
TESTS += tests/ector/suite/ector_suite

tests_ector_suite_ector_suite_SOURCES = \
tests/ector/suite/ector_suite.c \
tests/ector/suite/ector_suite.h \
tests/ector/suite/ector_test_init.c

tests_ector_cxx_compile_test_cxx_compile_test_SOURCES = tests/ector/cxx_compile_test/cxx_compile_test.cxx
tests_ector_cxx_compile_test_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECTOR_CFLAGS@
tests_ector_cxx_compile_test_cxx_compile_test_LDADD = @USE_ECTOR_LIBS@
tests_ector_cxx_compile_test_cxx_compile_test_DEPENDENCIES = @USE_ECTOR_INTERNAL_LIBS@


tests_ector_suite_ector_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
-I$(top_srcdir)/src/tests/ector \
-DTESTS_WD=\"`pwd`\" \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ector/suite\" \
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/\" \
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ector\" \
@CHECK_CFLAGS@ \
@ECTOR_CFLAGS@
tests_ector_suite_ector_suite_LDADD = @CHECK_LIBS@ @USE_ECTOR_LIBS@
tests_ector_suite_ector_suite_DEPENDENCIES = @USE_ECTOR_INTERNAL_LIBS@

endif

EXTRA_DIST2 += \
lib/ector/ector_private.h \
lib/ector/cairo/ector_cairo_private.h \
lib/ector/software/ector_software_private.h \
static_libs/freetype/sw_ft_math.h \
static_libs/freetype/sw_ft_raster.h \
static_libs/freetype/sw_ft_stroker.h \
static_libs/freetype/sw_ft_types.h \
static_libs/draw/draw.h \
static_libs/draw/draw_private.h \
$(ECTOR_GL_SHADERS_GEN)