gallium: more trivial tests
[mesa.git] / progs / trivial / Makefile
1 # progs/tests/Makefile
2
3
4 # These programs aren't intended to be included with the normal distro.
5 # They're not too interesting but they're good for testing.
6
7 TOP = ../..
8 include $(TOP)/configs/current
9
10
11 LIBS = $(APP_LIB_DEPS)
12
13 SOURCES = \
14 clear-fbo-tex.c \
15 clear-fbo.c \
16 clear-scissor.c \
17 clear.c \
18 dlist-dangling.c \
19 dlist-edgeflag-dangling.c \
20 dlist-edgeflag.c \
21 drawarrays.c \
22 drawelements.c \
23 drawrange.c \
24 flat-clip.c \
25 fs-tri.c \
26 line-clip.c \
27 line-cull.c \
28 line-stipple-wide.c \
29 line-userclip-clip.c \
30 line-userclip-nop-clip.c \
31 line-userclip-nop.c \
32 line-userclip.c \
33 line-wide.c \
34 line.c \
35 lineloop-clip.c \
36 lineloop-elts.c \
37 lineloop.c \
38 linestrip-flat-stipple.c \
39 linestrip-stipple-wide.c \
40 linestrip-stipple.c \
41 linestrip.c \
42 point-clip.c \
43 point-param.c \
44 point-sprite.c \
45 point-wide.c \
46 point.c \
47 poly-flat.c \
48 poly-unfilled.c \
49 poly.c \
50 quad-clip-all-vertices.c \
51 quad-clip-nearplane.c \
52 quad-clip.c \
53 quad-degenerate.c \
54 quad-flat.c \
55 quad-offset-factor.c \
56 quad-offset-unfilled.c \
57 quad-offset-units.c \
58 quad-tex-2d.c \
59 quad-tex-3d.c \
60 quad-tex-alpha.c \
61 quad-tex-pbo.c \
62 quad-unfilled-clip.c \
63 quad-unfilled-stipple.c \
64 quad-unfilled.c \
65 quad.c \
66 quads.c \
67 quadstrip-cont.c \
68 quadstrip-flat.c \
69 quadstrip.c \
70 tri-alpha.c \
71 tri-blend-color.c \
72 tri-blend-max.c \
73 tri-blend-min.c \
74 tri-blend-revsub.c \
75 tri-blend-sub.c \
76 tri-blend.c \
77 tri-clip.c \
78 tri-cull-both.c \
79 tri-cull.c \
80 tri-dlist.c \
81 tri-edgeflag.c \
82 tri-fbo-tex.c \
83 tri-fbo.c \
84 tri-flat-clip.c \
85 tri-flat.c \
86 tri-fog.c \
87 tri-mask-tri.c \
88 tri-query.c \
89 tri-scissor-tri.c \
90 tri-stencil.c \
91 tri-tex-3d.c \
92 tri-tri.c \
93 tri-unfilled-clip.c \
94 tri-unfilled-smooth.c \
95 tri-unfilled-userclip-stip.c \
96 tri-unfilled-userclip.c \
97 tri-unfilled.c \
98 tri-userclip.c \
99 tri-z-eq.c \
100 tri-z.c \
101 tri.c \
102 tristrip-clip.c \
103 tristrip.c \
104 vbo-drawarrays.c \
105 vbo-drawelements.c \
106 vbo-drawrange.c \
107 vp-array.c \
108 vp-clip.c \
109 vp-line-clip.c \
110 vp-tri.c \
111 vp-unfilled.c
112
113 PROGS = $(SOURCES:%.c=%)
114
115 INCLUDES = -I. -I$(TOP)/include -I../samples
116
117 UTIL_FILES = readtex.h readtex.c
118
119
120 ##### RULES #####
121
122 .SUFFIXES:
123 .SUFFIXES: .c
124
125 .c:
126 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
127
128 .c.o:
129 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
130
131 .S.o:
132 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
133
134
135 ##### TARGETS #####
136
137 default: $(UTIL_FILES) $(PROGS)
138
139 clean:
140 rm -f $(PROGS)
141 rm -f *.o
142 rm -f getproclist.h
143
144
145 # auto code generation
146 getprocaddress: getprocaddress.c getproclist.h
147
148 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
149 python getprocaddress.py > getproclist.h
150
151
152 texrect: texrect.o readtex.o
153 $(CC) texrect.o readtex.o $(LIBS) -o $@
154
155 texrect.o: texrect.c readtex.h
156 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
157
158 invert: invert.o readtex.o
159 $(CC) invert.o readtex.o $(LIBS) -o $@
160
161 invert.o: invert.c readtex.h
162 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
163
164 readtex.o: readtex.c
165 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
166
167
168 readtex.h: $(TOP)/progs/util/readtex.h
169 ln -s $(TOP)/progs/util/readtex.h .
170
171 readtex.c: $(TOP)/progs/util/readtex.c
172 ln -s $(TOP)/progs/util/readtex.c .
173
174
175 fs-tri: fs-tri.c extfuncs.h
176
177
178 extfuncs.h: $(TOP)/progs/util/extfuncs.h
179 cp $< .
180
181
182 # Emacs tags
183 tags:
184 etags `find . -name \*.[ch]` `find ../include`