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