progs/trivial: add test case for short-circuiting material changes
[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 = -L$(TOP)/$(LIB_DIR) -l $(GLEW_LIB) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 SOURCES = \
14 clear-fbo-tex.c \
15 clear-fbo.c \
16 clear-scissor.c \
17 clear-undefined.c \
18 clear-repeat.c \
19 clear-random.c \
20 clear.c \
21 dlist-dangling.c \
22 dlist-flat-tri.c \
23 dlist-tri-flat-tri.c \
24 dlist-tri-mat-tri.c \
25 dlist-recursive-call.c \
26 dlist-edgeflag-dangling.c \
27 dlist-edgeflag.c \
28 dlist-degenerate.c \
29 drawarrays.c \
30 draw2arrays.c \
31 drawelements.c \
32 drawrange.c \
33 flat-clip.c \
34 fs-tri.c \
35 line-clip.c \
36 line-cull.c \
37 line-flat.c \
38 line-smooth.c \
39 line-stipple-wide.c \
40 line-userclip-clip.c \
41 line-userclip-nop-clip.c \
42 line-userclip-nop.c \
43 line-userclip.c \
44 line-wide.c \
45 line.c \
46 lineloop-clip.c \
47 lineloop-elts.c \
48 lineloop.c \
49 linestrip-flat-stipple.c \
50 linestrip-stipple-wide.c \
51 linestrip-stipple.c \
52 linestrip.c \
53 long-fixed-func.c \
54 pgon-mode.c \
55 point-clip.c \
56 point-param.c \
57 point-sprite.c \
58 point-wide.c \
59 point-wide-smooth.c \
60 point.c \
61 poly-flat.c \
62 poly-flat-clip.c \
63 poly-flat-unfilled-clip.c \
64 poly-unfilled.c \
65 poly.c \
66 quad-clip-all-vertices.c \
67 quad-clip-nearplane.c \
68 quad-clip.c \
69 quad-degenerate.c \
70 quad-flat.c \
71 quad-offset-factor.c \
72 quad-offset-unfilled.c \
73 quad-offset-units.c \
74 quad-tex-2d.c \
75 quad-tex-3d.c \
76 quad-tex-alpha.c \
77 quad-tex-pbo.c \
78 quad-tex-sub.c \
79 quad-unfilled-clip.c \
80 quad-unfilled-stipple.c \
81 quad-unfilled.c \
82 quad.c \
83 quads.c \
84 quadstrip-clip.c \
85 quadstrip-cont.c \
86 quadstrip-flat.c \
87 quadstrip.c \
88 tri-alpha.c \
89 tri-array-interleaved.c \
90 tri-blend-color.c \
91 tri-blend-max.c \
92 tri-blend-min.c \
93 tri-blend-revsub.c \
94 tri-blend-sub.c \
95 tri-blend.c \
96 tri-clip.c \
97 tri-cull-both.c \
98 tri-cull.c \
99 tri-logicop-none.c \
100 tri-logicop-xor.c \
101 tri-dlist.c \
102 tri-edgeflag.c \
103 tri-fbo-tex-mip.c \
104 tri-fbo-tex.c \
105 tri-fbo.c \
106 tri-flat-clip.c \
107 tri-flat.c \
108 tri-fog.c \
109 tri-fp.c \
110 tri-fp-const-imm.c \
111 tri-lit.c \
112 tri-lit-material.c \
113 tri-mask-tri.c \
114 tri-orig.c \
115 tri-query.c \
116 tri-repeat.c \
117 tri-scissor-tri.c \
118 tri-stencil.c \
119 tri-stipple.c \
120 tri-multitex-vbo.c \
121 tri-tex.c \
122 tri-tex-3d.c \
123 tri-tri.c \
124 tri-unfilled-fog.c \
125 tri-unfilled-edgeflag.c \
126 tri-unfilled-clip.c \
127 tri-unfilled-smooth.c \
128 tri-unfilled-tri.c \
129 tri-unfilled-tri-lit.c \
130 tri-unfilled-userclip-stip.c \
131 tri-unfilled-userclip.c \
132 tri-unfilled.c \
133 tri-userclip.c \
134 tri-viewport.c \
135 tri-z-eq.c \
136 tri-z.c \
137 tri.c \
138 trifan-flat.c \
139 trifan-flat-clip.c \
140 trifan-flat-unfilled-clip.c \
141 trifan-unfilled.c \
142 trifan.c \
143 tristrip-clip.c \
144 tristrip-flat.c \
145 tristrip.c \
146 vbo-drawarrays.c \
147 vbo-noninterleaved.c \
148 vbo-drawelements.c \
149 vbo-drawrange.c \
150 vp-array.c \
151 vp-array-int.c \
152 vp-clip.c \
153 vp-line-clip.c \
154 vp-tri.c \
155 vp-tri-invariant.c \
156 vp-tri-swap.c \
157 vp-tri-tex.c \
158 vp-tri-imm.c \
159 vp-tri-cb.c \
160 vp-tri-cb-pos.c \
161 vp-tri-cb-tex.c \
162 vp-unfilled.c
163
164 PROGS = $(SOURCES:%.c=%)
165
166 INCLUDES = -I. -I$(TOP)/include -I../samples
167
168 UTIL_FILES = readtex.h readtex.c
169
170
171 ##### RULES #####
172
173 .SUFFIXES:
174 .SUFFIXES: .c
175
176 .c:
177 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
178
179 .c.o:
180 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
181
182 .S.o:
183 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
184
185
186 ##### TARGETS #####
187
188 default: $(UTIL_FILES) $(PROGS)
189
190 clean:
191 -rm -f $(PROGS)
192 -rm -f *.o
193 -rm -f getproclist.h
194
195
196 # auto code generation
197 getprocaddress: getprocaddress.c getproclist.h
198
199 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
200 python getprocaddress.py > getproclist.h
201
202
203 texrect: texrect.o readtex.o
204 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
205
206 texrect.o: texrect.c readtex.h
207 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
208
209 invert: invert.o readtex.o
210 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
211
212 invert.o: invert.c readtex.h
213 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
214
215 readtex.o: readtex.c
216 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
217
218
219 readtex.h: $(TOP)/progs/util/readtex.h
220 ln -s $(TOP)/progs/util/readtex.h .
221
222 readtex.c: $(TOP)/progs/util/readtex.c
223 ln -s $(TOP)/progs/util/readtex.c .
224
225
226 fs-tri: fs-tri.c extfuncs.h
227
228
229 extfuncs.h: $(TOP)/progs/util/extfuncs.h
230 cp $< .
231
232
233 # Emacs tags
234 tags:
235 etags `find . -name \*.[ch]` `find ../include`