]> git.cworth.org Git - fips/blob - test/Makefile.local
Add explicit link to libpthread, to work around debugging issues
[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 PTHREAD_LDFLAGS = -pthread
33
34 $(dir)/glx-link-call: $(glx_link_call_modules)
35         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
36
37 glx_link_gpa_srcs = \
38         $(dir)/glx-link-gpa.c \
39         $(dir)/util-x11.c
40
41 glx_link_gpa_modules = $(glx_link_gpa_srcs:.c=.o)
42
43 $(dir)/glx-link-gpa: $(glx_link_gpa_modules)
44         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
45
46 glx_link_gpaa_srcs = \
47         $(dir)/glx-link-gpaa.c \
48         $(dir)/util-x11.c
49
50 glx_link_gpaa_modules = $(glx_link_gpaa_srcs:.c=.o)
51
52 $(dir)/glx-link-gpaa: $(glx_link_gpaa_modules)
53         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
54
55 glx_dlopen_dlsym_srcs = \
56         $(dir)/glx-dlopen-dlsym.c \
57         $(dir)/util-x11.c
58
59 glx_dlopen_dlsym_modules = $(glx_dlopen_dlsym_srcs:.c=.o)
60
61 $(dir)/glx-dlopen-dlsym: $(glx_dlopen_dlsym_modules)
62         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
63
64 glx_dlopen_gpa_srcs = \
65         $(dir)/glx-dlopen-gpa.c \
66         $(dir)/util-x11.c
67
68 glx_dlopen_gpa_modules = $(glx_dlopen_gpa_srcs:.c=.o)
69
70 $(dir)/glx-dlopen-gpa: $(glx_dlopen_gpa_modules)
71         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
72
73 glx_dlopen_gpaa_srcs = \
74         $(dir)/glx-dlopen-gpaa.c \
75         $(dir)/util-x11.c
76
77 glx_dlopen_gpaa_modules = $(glx_dlopen_gpaa_srcs:.c=.o)
78
79 $(dir)/glx-dlopen-gpaa: $(glx_dlopen_gpaa_modules)
80         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
81
82 egl_opengl_link_call_srcs = \
83         $(dir)/egl-opengl-link-call.c \
84         $(dir)/util-x11.c
85
86 egl_opengl_link_call_modules = $(egl_opengl_link_call_srcs:.c=.o)
87
88 $(dir)/egl-opengl-link-call: $(egl_opengl_link_call_modules)
89         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GL_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
90
91 egl_opengl_link_gpa_srcs = \
92         $(dir)/egl-opengl-link-gpa.c \
93         $(dir)/util-x11.c
94
95 egl_opengl_link_gpa_modules = $(egl_opengl_link_gpa_srcs:.c=.o)
96
97 $(dir)/egl-opengl-link-gpa: $(egl_opengl_link_gpa_modules)
98         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GL_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
99
100 egl_opengl_dlopen_dlsym_srcs = \
101         $(dir)/egl-opengl-dlopen-dlsym.c \
102         $(dir)/util-x11.c
103
104 egl_opengl_dlopen_dlsym_modules = $(egl_opengl_dlopen_dlsym_srcs:.c=.o)
105
106 $(dir)/egl-opengl-dlopen-dlsym: $(egl_opengl_dlopen_dlsym_modules)
107         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
108
109 egl_opengl_dlopen_gpa_srcs = \
110         $(dir)/egl-opengl-dlopen-gpa.c \
111         $(dir)/util-x11.c
112
113 egl_opengl_dlopen_gpa_modules = $(egl_opengl_dlopen_gpa_srcs:.c=.o)
114
115 $(dir)/egl-opengl-dlopen-gpa: $(egl_opengl_dlopen_gpa_modules)
116         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
117
118 egl_glesv2_link_call_srcs = \
119         $(dir)/egl-glesv2-link-call.c \
120         $(dir)/util-x11.c
121
122 egl_glesv2_link_call_modules = $(egl_glesv2_link_call_srcs:.c=.o)
123
124 $(dir)/egl-glesv2-link-call: $(egl_glesv2_link_call_modules)
125         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GLESV2_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
126
127 egl_glesv2_link_gpa_srcs = \
128         $(dir)/egl-glesv2-link-gpa.c \
129         $(dir)/util-x11.c
130
131 egl_glesv2_link_gpa_modules = $(egl_glesv2_link_gpa_srcs:.c=.o)
132
133 $(dir)/egl-glesv2-link-gpa: $(egl_glesv2_link_gpa_modules)
134         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GLESV2_LDFLAGS) $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
135
136 egl_glesv2_dlopen_dlsym_srcs = \
137         $(dir)/egl-glesv2-dlopen-dlsym.c \
138         $(dir)/util-x11.c
139
140 egl_glesv2_dlopen_dlsym_modules = $(egl_glesv2_dlopen_dlsym_srcs:.c=.o)
141
142 $(dir)/egl-glesv2-dlopen-dlsym: $(egl_glesv2_dlopen_dlsym_modules)
143         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
144
145 egl_glesv2_dlopen_gpa_srcs = \
146         $(dir)/egl-glesv2-dlopen-gpa.c \
147         $(dir)/util-x11.c
148
149 egl_glesv2_dlopen_gpa_modules = $(egl_glesv2_dlopen_gpa_srcs:.c=.o)
150
151 $(dir)/egl-glesv2-dlopen-gpa: $(egl_glesv2_dlopen_gpa_modules)
152         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) $(PTHREAD_LDFLAGS) -o $@
153
154 test: all $(test_programs)
155         @${dir}/fips-test
156
157 check: test
158
159 SRCS := $(SRCS) \
160         $(glx_link_call_srcs) \
161         $(glx_link_gpa_srcs) \
162         $(glx_link_gpaa_srcs) \
163         $(glx_dlopen_dlsym_srcs) \
164         $(glx_dlopen_gpa_srcs) \
165         $(egl_opengl_link_call_srcs) \
166         $(egl_opengl_link_gpa_srcs) \
167         $(egl_opengl_dlopen_dlsym_srcs) \
168         $(egl_opengl_dlopen_gpa_srcs) \
169         $(egl_glesv2_link_call_srcs) \
170         $(egl_glesv2_link_gpa_srcs) \
171         $(egl_glesv2_dlopen_dlsym_srcs) \
172         $(egl_glesv2_dlopen_gpa_srcs)
173
174 CLEAN += $(test_programs) \
175         $(glx_link_call_modules) \
176         $(glx_link_gpa_modules) \
177         $(glx_link_gpaa_modules) \
178         $(glx_dlopen_dlsym_modules) \
179         $(glx_dlopen_gpa_modules) \
180         $(egl_opengl_link_call_modules) \
181         $(egl_opengl_link_gpa_modules) \
182         $(egl_opengl_dlopen_dlsym_modules) \
183         $(egl_opengl_dlopen_dlsym_modules) \
184         $(egl_glesv2_link_call_modules) \
185         $(egl_glesv2_link_gpa_modules) \
186         $(egl_glesv2_dlopen_dlsym_modules) \
187         $(egl_glesv2_dlopen_dlsym_modules)