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