1#******************************************************************************
2# Copyright (c), Recep Aslantas.                                              *
3#                                                                             *
4# MIT License (MIT), http://opensource.org/licenses/MIT                       *
5# Full license can be found in the LICENSE file                               *
6#                                                                             *
7#******************************************************************************
8
9ACLOCAL_AMFLAGS = -I m4
10AM_CFLAGS = -Wall \
11            -std=gnu11 \
12            -O3 \
13            -Wstrict-aliasing=2 \
14            -fstrict-aliasing \
15            -Werror=strict-prototypes
16
17lib_LTLIBRARIES = libcglm.la
18libcglm_la_LDFLAGS = -no-undefined -version-info 0:1:0
19
20checkLDFLAGS = -L./.libs \
21               -lm \
22               -lcglm
23checkCFLAGS = $(AM_CFLAGS) \
24               -std=gnu11 \
25               -O3 \
26               -DCGLM_DEFINE_PRINTS \
27               -I./include
28
29check_PROGRAMS = test/tests
30TESTS = $(check_PROGRAMS)
31
32test_tests_LDFLAGS = $(checkLDFLAGS)
33test_tests_CFLAGS  = $(checkCFLAGS)
34
35cglmdir=$(includedir)/cglm
36cglm_HEADERS = include/cglm/version.h \
37               include/cglm/common.h \
38               include/cglm/types.h \
39               include/cglm/types-struct.h \
40               include/cglm/cglm.h \
41               include/cglm/call.h \
42               include/cglm/struct.h \
43               include/cglm/cam.h \
44               include/cglm/io.h \
45               include/cglm/mat4.h \
46               include/cglm/mat3.h \
47               include/cglm/mat2.h \
48               include/cglm/affine.h \
49               include/cglm/vec2.h \
50               include/cglm/vec2-ext.h \
51               include/cglm/vec3.h \
52               include/cglm/vec3-ext.h \
53               include/cglm/vec4.h \
54               include/cglm/vec4-ext.h \
55               include/cglm/euler.h \
56               include/cglm/util.h \
57               include/cglm/quat.h \
58               include/cglm/affine-mat.h \
59               include/cglm/plane.h \
60               include/cglm/frustum.h \
61               include/cglm/box.h \
62               include/cglm/color.h \
63               include/cglm/project.h \
64               include/cglm/sphere.h \
65               include/cglm/ease.h \
66               include/cglm/curve.h \
67               include/cglm/bezier.h \
68               include/cglm/applesimd.h \
69               include/cglm/ray.h \
70               include/cglm/affine2d.h
71
72cglm_clipspacedir=$(includedir)/cglm/clipspace
73cglm_clipspace_HEADERS = include/cglm/clipspace/persp.h \
74                         include/cglm/clipspace/persp_lh_zo.h \
75                         include/cglm/clipspace/persp_rh_zo.h \
76                         include/cglm/clipspace/persp_lh_no.h \
77                         include/cglm/clipspace/persp_rh_no.h \
78                         include/cglm/clipspace/ortho_lh_zo.h \
79                         include/cglm/clipspace/ortho_rh_zo.h \
80                         include/cglm/clipspace/ortho_lh_no.h \
81                         include/cglm/clipspace/ortho_rh_no.h \
82                         include/cglm/clipspace/view_lh.h \
83                         include/cglm/clipspace/view_rh.h \
84                         include/cglm/clipspace/view_lh_zo.h \
85                         include/cglm/clipspace/view_rh_zo.h \
86                         include/cglm/clipspace/view_lh_no.h \
87                         include/cglm/clipspace/view_rh_no.h \
88                         include/cglm/clipspace/project_zo.h \
89                         include/cglm/clipspace/project_no.h
90
91cglm_calldir=$(includedir)/cglm/call
92cglm_call_HEADERS = include/cglm/call/mat4.h \
93                    include/cglm/call/mat3.h \
94                    include/cglm/call/mat2.h \
95                    include/cglm/call/vec2.h \
96                    include/cglm/call/vec3.h \
97                    include/cglm/call/vec4.h \
98                    include/cglm/call/affine.h \
99                    include/cglm/call/io.h \
100                    include/cglm/call/cam.h \
101                    include/cglm/call/quat.h \
102                    include/cglm/call/euler.h \
103                    include/cglm/call/plane.h \
104                    include/cglm/call/frustum.h \
105                    include/cglm/call/box.h \
106                    include/cglm/call/project.h \
107                    include/cglm/call/sphere.h \
108                    include/cglm/call/ease.h \
109                    include/cglm/call/curve.h \
110                    include/cglm/call/bezier.h \
111                    include/cglm/call/ray.h \
112                    include/cglm/call/affine2d.h
113
114cglm_call_clipspacedir=$(includedir)/cglm/call/clipspace
115cglm_call_clipspace_HEADERS = include/cglm/call/clipspace/persp_lh_zo.h \
116                              include/cglm/call/clipspace/persp_rh_zo.h \
117                              include/cglm/call/clipspace/persp_lh_no.h \
118                              include/cglm/call/clipspace/persp_rh_no.h \
119                              include/cglm/call/clipspace/ortho_lh_zo.h \
120                              include/cglm/call/clipspace/ortho_rh_zo.h \
121                              include/cglm/call/clipspace/ortho_lh_no.h \
122                              include/cglm/call/clipspace/ortho_rh_no.h \
123                              include/cglm/call/clipspace/view_lh_zo.h \
124                              include/cglm/call/clipspace/view_rh_zo.h \
125                              include/cglm/call/clipspace/view_lh_no.h \
126                              include/cglm/call/clipspace/view_rh_no.h \
127                              include/cglm/call/clipspace/project_no.h \
128                              include/cglm/call/clipspace/project_zo.h
129
130cglm_simddir=$(includedir)/cglm/simd
131cglm_simd_HEADERS = include/cglm/simd/intrin.h \
132                    include/cglm/simd/x86.h \
133                    include/cglm/simd/arm.h
134
135cglm_simd_sse2dir=$(includedir)/cglm/simd/sse2
136cglm_simd_sse2_HEADERS = include/cglm/simd/sse2/affine.h \
137                         include/cglm/simd/sse2/mat4.h \
138                         include/cglm/simd/sse2/mat3.h \
139                         include/cglm/simd/sse2/mat2.h \
140                         include/cglm/simd/sse2/quat.h
141
142cglm_simd_avxdir=$(includedir)/cglm/simd/avx
143cglm_simd_avx_HEADERS = include/cglm/simd/avx/mat4.h \
144                        include/cglm/simd/avx/affine.h
145
146cglm_simd_neondir=$(includedir)/cglm/simd/neon
147cglm_simd_neon_HEADERS = include/cglm/simd/neon/mat4.h \
148                         include/cglm/simd/neon/mat2.h \
149                         include/cglm/simd/neon/affine.h \
150                         include/cglm/simd/neon/quat.h
151
152cglm_structdir=$(includedir)/cglm/struct
153cglm_struct_HEADERS = include/cglm/struct/mat4.h \
154                      include/cglm/struct/mat3.h \
155                      include/cglm/struct/mat2.h \
156                      include/cglm/struct/vec2.h \
157                      include/cglm/struct/vec2-ext.h \
158                      include/cglm/struct/vec3.h \
159                      include/cglm/struct/vec3-ext.h \
160                      include/cglm/struct/vec4.h \
161                      include/cglm/struct/vec4-ext.h \
162                      include/cglm/struct/affine.h \
163                      include/cglm/struct/io.h \
164                      include/cglm/struct/cam.h \
165                      include/cglm/struct/quat.h \
166                      include/cglm/struct/euler.h \
167                      include/cglm/struct/plane.h \
168                      include/cglm/struct/frustum.h \
169                      include/cglm/struct/box.h \
170                      include/cglm/struct/project.h \
171                      include/cglm/struct/sphere.h \
172                      include/cglm/struct/color.h \
173                      include/cglm/struct/curve.h \
174                      include/cglm/struct/affine2d.h
175
176cglm_struct_clipspacedir=$(includedir)/cglm/struct/clipspace
177cglm_struct_clipspace_HEADERS = include/cglm/struct/clipspace/persp_lh_zo.h \
178                                include/cglm/struct/clipspace/persp_rh_zo.h \
179                                include/cglm/struct/clipspace/persp_lh_no.h \
180                                include/cglm/struct/clipspace/persp_rh_no.h \
181                                include/cglm/struct/clipspace/ortho_lh_zo.h \
182                                include/cglm/struct/clipspace/ortho_rh_zo.h \
183                                include/cglm/struct/clipspace/ortho_lh_no.h \
184                                include/cglm/struct/clipspace/ortho_rh_no.h \
185                                include/cglm/struct/clipspace/view_lh_zo.h \
186                                include/cglm/struct/clipspace/view_rh_zo.h \
187                                include/cglm/struct/clipspace/view_lh_no.h \
188                                include/cglm/struct/clipspace/view_rh_no.h
189
190libcglm_la_SOURCES=\
191    src/euler.c \
192    src/affine.c \
193    src/io.c \
194    src/quat.c \
195    src/cam.c \
196    src/vec2.c \
197    src/vec3.c \
198    src/vec4.c \
199    src/mat2.c \
200    src/mat3.c \
201    src/mat4.c \
202    src/plane.c \
203    src/frustum.c \
204    src/box.c \
205    src/project.c \
206    src/sphere.c \
207    src/ease.c \
208    src/curve.c \
209    src/bezier.c \
210    src/ray.c \
211    src/affine2d.c \
212    src/clipspace/ortho_lh_no.c \
213    src/clipspace/ortho_lh_zo.c \
214    src/clipspace/ortho_rh_no.c \
215    src/clipspace/ortho_rh_zo.c \
216    src/clipspace/persp_lh_no.c \
217    src/clipspace/persp_lh_zo.c \
218    src/clipspace/persp_rh_no.c \
219    src/clipspace/persp_rh_zo.c \
220    src/clipspace/view_lh_no.c \
221    src/clipspace/view_lh_zo.c \
222    src/clipspace/view_rh_no.c \
223    src/clipspace/view_rh_zo.c \
224    src/clipspace/project_no.c \
225    src/clipspace/project_zo.c
226
227test_tests_SOURCES=\
228    test/runner.c \
229    test/src/test_common.c \
230    test/src/tests.c \
231    test/src/test_cam.c \
232    test/src/test_cam_lh_zo.c \
233    test/src/test_cam_rh_zo.c \
234    test/src/test_cam_lh_no.c \
235    test/src/test_cam_rh_no.c \
236    test/src/test_clamp.c \
237    test/src/test_euler.c \
238    test/src/test_bezier.c \
239    test/src/test_struct.c
240
241pkgconfig_DATA=cglm.pc
242
243# When running configure with --prefix, $VPATH references
244# the source directory that post-build.sh is in. When not
245# using a prefix, $VPATH will be unset, so we need to fall
246# back to using . to run the script.
247#export VPATH
248
249# all-local:
250#	sh $${VPATH:-.}/post-build.sh
251