]> git.cworth.org Git - fips/blob - test/Makefile.local
test: Add 4 tests using EGL and OpenGLESv2
[fips] / test / Makefile.local
1 # -*- makefile -*-
2
3 dir := test
4
5 extra_cflags += -I. $(GL_CFLAGS) $(X11_CFLAGS)
6
7 test_programs =
8
9 ifeq ($(HAVE_X11),Yes)
10 test_programs += $(dir)/glx-link-call
11 test_programs += $(dir)/glx-link-gpa
12 test_programs += $(dir)/glx-link-gpaa
13 test_programs += $(dir)/glx-dlopen-dlsym
14 test_programs += $(dir)/glx-dlopen-gpa
15 test_programs += $(dir)/glx-dlopen-gpaa
16 test_programs += $(dir)/egl-opengl-link-call
17 test_programs += $(dir)/egl-opengl-link-gpa
18 test_programs += $(dir)/egl-opengl-dlopen-dlsym
19 test_programs += $(dir)/egl-opengl-dlopen-gpa
20 test_programs += $(dir)/egl-glesv2-link-call
21 test_programs += $(dir)/egl-glesv2-link-gpa
22 test_programs += $(dir)/egl-glesv2-dlopen-dlsym
23 test_programs += $(dir)/egl-glesv2-dlopen-gpa
24 endif
25
26 glx_link_call_srcs = \
27         $(dir)/glx-link-call.c \
28         $(dir)/util-x11.c
29
30 glx_link_call_modules = $(glx_link_call_srcs:.c=.o)
31
32 $(dir)/glx-link-call: $(glx_link_call_modules)
33         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
34
35 glx_link_gpa_srcs = \
36         $(dir)/glx-link-gpa.c \
37         $(dir)/util-x11.c
38
39 glx_link_gpa_modules = $(glx_link_gpa_srcs:.c=.o)
40
41 $(dir)/glx-link-gpa: $(glx_link_gpa_modules)
42         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
43
44 glx_link_gpaa_srcs = \
45         $(dir)/glx-link-gpaa.c \
46         $(dir)/util-x11.c
47
48 glx_link_gpaa_modules = $(glx_link_gpaa_srcs:.c=.o)
49
50 $(dir)/glx-link-gpaa: $(glx_link_gpaa_modules)
51         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
52
53 glx_dlopen_dlsym_srcs = \
54         $(dir)/glx-dlopen-dlsym.c \
55         $(dir)/util-x11.c
56
57 glx_dlopen_dlsym_modules = $(glx_dlopen_dlsym_srcs:.c=.o)
58
59 $(dir)/glx-dlopen-dlsym: $(glx_dlopen_dlsym_modules)
60         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
61
62 glx_dlopen_gpa_srcs = \
63         $(dir)/glx-dlopen-gpa.c \
64         $(dir)/util-x11.c
65
66 glx_dlopen_gpa_modules = $(glx_dlopen_gpa_srcs:.c=.o)
67
68 $(dir)/glx-dlopen-gpa: $(glx_dlopen_gpa_modules)
69         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
70
71 glx_dlopen_gpaa_srcs = \
72         $(dir)/glx-dlopen-gpaa.c \
73         $(dir)/util-x11.c
74
75 glx_dlopen_gpaa_modules = $(glx_dlopen_gpaa_srcs:.c=.o)
76
77 $(dir)/glx-dlopen-gpaa: $(glx_dlopen_gpaa_modules)
78         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
79
80 egl_opengl_link_call_srcs = \
81         $(dir)/egl-opengl-link-call.c \
82         $(dir)/util-x11.c
83
84 egl_opengl_link_call_modules = $(egl_opengl_link_call_srcs:.c=.o)
85
86 $(dir)/egl-opengl-link-call: $(egl_opengl_link_call_modules)
87         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
88
89 egl_opengl_link_gpa_srcs = \
90         $(dir)/egl-opengl-link-gpa.c \
91         $(dir)/util-x11.c
92
93 egl_opengl_link_gpa_modules = $(egl_opengl_link_gpa_srcs:.c=.o)
94
95 $(dir)/egl-opengl-link-gpa: $(egl_opengl_link_gpa_modules)
96         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
97
98 egl_opengl_dlopen_dlsym_srcs = \
99         $(dir)/egl-opengl-dlopen-dlsym.c \
100         $(dir)/util-x11.c
101
102 egl_opengl_dlopen_dlsym_modules = $(egl_opengl_dlopen_dlsym_srcs:.c=.o)
103
104 $(dir)/egl-opengl-dlopen-dlsym: $(egl_opengl_dlopen_dlsym_modules)
105         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
106
107 egl_opengl_dlopen_gpa_srcs = \
108         $(dir)/egl-opengl-dlopen-gpa.c \
109         $(dir)/util-x11.c
110
111 egl_opengl_dlopen_gpa_modules = $(egl_opengl_dlopen_gpa_srcs:.c=.o)
112
113 $(dir)/egl-opengl-dlopen-gpa: $(egl_opengl_dlopen_gpa_modules)
114         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
115
116 egl_glesv2_link_call_srcs = \
117         $(dir)/egl-glesv2-link-call.c \
118         $(dir)/util-x11.c
119
120 egl_glesv2_link_call_modules = $(egl_glesv2_link_call_srcs:.c=.o)
121
122 $(dir)/egl-glesv2-link-call: $(egl_glesv2_link_call_modules)
123         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GLESV2_LDFLAGS) $(X11_LDFLAGS) -o $@
124
125 egl_glesv2_link_gpa_srcs = \
126         $(dir)/egl-glesv2-link-gpa.c \
127         $(dir)/util-x11.c
128
129 egl_glesv2_link_gpa_modules = $(egl_glesv2_link_gpa_srcs:.c=.o)
130
131 $(dir)/egl-glesv2-link-gpa: $(egl_glesv2_link_gpa_modules)
132         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GLESV2_LDFLAGS) $(X11_LDFLAGS) -o $@
133
134 egl_glesv2_dlopen_dlsym_srcs = \
135         $(dir)/egl-glesv2-dlopen-dlsym.c \
136         $(dir)/util-x11.c
137
138 egl_glesv2_dlopen_dlsym_modules = $(egl_glesv2_dlopen_dlsym_srcs:.c=.o)
139
140 $(dir)/egl-glesv2-dlopen-dlsym: $(egl_glesv2_dlopen_dlsym_modules)
141         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
142
143 egl_glesv2_dlopen_gpa_srcs = \
144         $(dir)/egl-glesv2-dlopen-gpa.c \
145         $(dir)/util-x11.c
146
147 egl_glesv2_dlopen_gpa_modules = $(egl_glesv2_dlopen_gpa_srcs:.c=.o)
148
149 $(dir)/egl-glesv2-dlopen-gpa: $(egl_glesv2_dlopen_gpa_modules)
150         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
151
152 test: all $(test_programs)
153         @${dir}/fips-test
154
155 check: test
156
157 SRCS := $(SRCS) \
158         $(glx_link_call_srcs) \
159         $(glx_link_gpa_srcs) \
160         $(glx_link_gpaa_srcs) \
161         $(glx_dlopen_dlsym_srcs) \
162         $(glx_dlopen_gpa_srcs) \
163         $(egl_opengl_link_call_srcs) \
164         $(egl_opengl_link_gpa_srcs) \
165         $(egl_opengl_dlopen_dlsym_srcs) \
166         $(egl_opengl_dlopen_gpa_srcs) \
167         $(egl_glesv2_link_call_srcs) \
168         $(egl_glesv2_link_gpa_srcs) \
169         $(egl_glesv2_dlopen_dlsym_srcs) \
170         $(egl_glesv2_dlopen_gpa_srcs)
171
172 CLEAN += $(test_programs) \
173         $(glx_link_call_modules) \
174         $(glx_link_gpa_modules) \
175         $(glx_link_gpaa_modules) \
176         $(glx_dlopen_dlsym_modules) \
177         $(glx_dlopen_gpa_modules) \
178         $(egl_opengl_link_call_modules) \
179         $(egl_opengl_link_gpa_modules) \
180         $(egl_opengl_dlopen_dlsym_modules) \
181         $(egl_opengl_dlopen_dlsym_modules) \
182         $(egl_glesv2_link_call_modules) \
183         $(egl_glesv2_link_gpa_modules) \
184         $(egl_glesv2_dlopen_dlsym_modules) \
185         $(egl_glesv2_dlopen_dlsym_modules)