]> git.cworth.org Git - fips/blob - test/Makefile.local
69e524aa16a0a5bc3960fded1ac769e4b2feca24
[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 endif
18
19 glx_link_call_srcs = \
20         $(dir)/glx-link-call.c \
21         $(dir)/util-x11.c
22
23 glx_link_call_modules = $(glx_link_call_srcs:.c=.o)
24
25 $(dir)/glx-link-call: $(glx_link_call_modules)
26         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
27
28 glx_link_gpa_srcs = \
29         $(dir)/glx-link-gpa.c \
30         $(dir)/util-x11.c
31
32 glx_link_gpa_modules = $(glx_link_gpa_srcs:.c=.o)
33
34 $(dir)/glx-link-gpa: $(glx_link_gpa_modules)
35         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
36
37 glx_link_gpaa_srcs = \
38         $(dir)/glx-link-gpaa.c \
39         $(dir)/util-x11.c
40
41 glx_link_gpaa_modules = $(glx_link_gpaa_srcs:.c=.o)
42
43 $(dir)/glx-link-gpaa: $(glx_link_gpaa_modules)
44         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
45
46 glx_dlopen_dlsym_srcs = \
47         $(dir)/glx-dlopen-dlsym.c \
48         $(dir)/util-x11.c
49
50 glx_dlopen_dlsym_modules = $(glx_dlopen_dlsym_srcs:.c=.o)
51
52 $(dir)/glx-dlopen-dlsym: $(glx_dlopen_dlsym_modules)
53         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
54
55 glx_dlopen_gpa_srcs = \
56         $(dir)/glx-dlopen-gpa.c \
57         $(dir)/util-x11.c
58
59 glx_dlopen_gpa_modules = $(glx_dlopen_gpa_srcs:.c=.o)
60
61 $(dir)/glx-dlopen-gpa: $(glx_dlopen_gpa_modules)
62         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
63
64 glx_dlopen_gpaa_srcs = \
65         $(dir)/glx-dlopen-gpaa.c \
66         $(dir)/util-x11.c
67
68 glx_dlopen_gpaa_modules = $(glx_dlopen_gpaa_srcs:.c=.o)
69
70 $(dir)/glx-dlopen-gpaa: $(glx_dlopen_gpaa_modules)
71         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ -ldl $(X11_LDFLAGS) -o $@
72
73 egl_opengl_link_call_srcs = \
74         $(dir)/egl-opengl-link-call.c \
75         $(dir)/util-x11.c
76
77 egl_opengl_link_call_modules = $(egl_opengl_link_call_srcs:.c=.o)
78
79 $(dir)/egl-opengl-link-call: $(egl_opengl_link_call_modules)
80         $(call quiet,$(FIPS_LINKER) $(CFLAGS)) $^ $(EGL_LDFLAGS) $(GL_LDFLAGS) $(X11_LDFLAGS) -o $@
81
82 test: all $(test_programs)
83         @${dir}/fips-test
84
85 check: test
86
87 SRCS := $(SRCS) \
88         $(glx_link_call_srcs) \
89         $(glx_link_gpa_srcs) \
90         $(glx_link_gpaa_srcs) \
91         $(glx_dlopen_dlsym_srcs) \
92         $(glx_dlopen_gpa_srcs) \
93         $(egl_opengl_link_call_srcs)
94
95 CLEAN += $(test_programs) \
96         $(glx_link_call_modules) \
97         $(glx_link_gpa_modules) \
98         $(glx_link_gpaa_modules) \
99         $(glx_dlopen_dlsym_modules) \
100         $(glx_dlopen_gpa_modules) \
101         $(egl_opengl_link_call_modules)