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