]> git.cworth.org Git - fips/blob - test/Makefile.local
test: Add test using GLX with dlopen and dlsym to find symbols
[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-dlopen-dlsym
12 endif
13
14 glx_link_call_srcs = \
15         $(dir)/glx-link-call.c \
16         $(dir)/util.c
17
18 glx_link_call_modules = $(glx_link_call_srcs:.c=.o)
19
20 $(dir)/glx-link-call: $(glx_link_call_modules)
21         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
22
23 glx_dlopen_dlsym_srcs = \
24         $(dir)/glx-dlopen-dlsym.c \
25         $(dir)/util.c
26
27 glx_dlopen_dlsym_modules = $(glx_dlopen_dlsym_srcs:.c=.o)
28
29 $(dir)/glx-dlopen-dlsym: $(glx_dlopen_dlsym_modules)
30         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
31
32 test: all $(test_programs)
33         @${dir}/fips-test
34
35 check: test
36
37 SRCS := $(SRCS) $(glx_link_call_srcs) $(glx_dlopen_dlsym_srcs)
38
39 CLEAN += $(test_programs) $(glx_link_call_modules) $(glx_dlopen_dlsym_modules)