Merge remote branch 'origin/master' into gallium_draw_llvm
[mesa.git] / progs / tests / 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$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 SOURCES = \
14 afsmultiarb.c \
15 antialias.c \
16 arbfpspec.c \
17 arbfptest1.c \
18 arbfptexture.c \
19 arbfptrig.c \
20 arbgpuprog.c \
21 arbnpot.c \
22 arbnpot-mipmap.c \
23 arbvptest1.c \
24 arbvptest3.c \
25 arbvptorus.c \
26 arbvpwarpmesh.c \
27 arraytexture.c \
28 auxbuffer.c \
29 blendminmax.c \
30 blendsquare.c \
31 blendxor.c \
32 blitfb.c \
33 bufferobj.c \
34 bumpmap.c \
35 bug_3050.c \
36 bug_3101.c \
37 bug_3195.c \
38 bug_texstore_i8.c \
39 calibrate_rast.c \
40 condrender.c \
41 copypixrate.c \
42 crossbar.c \
43 cva.c \
44 cylwrap.c \
45 drawbuffers.c \
46 drawbuffers2.c \
47 exactrast.c \
48 ext422square.c \
49 floattex.c \
50 fbotest1.c \
51 fbotest2.c \
52 fbotest3.c \
53 fillrate.c \
54 fog.c \
55 fogcoord.c \
56 fptest1.c \
57 fptexture.c \
58 getprocaddress.c \
59 getteximage.c \
60 glutfx.c \
61 interleave.c \
62 invert.c \
63 jkrahntest.c \
64 lineclip.c \
65 manytex.c \
66 mapbufrange.c \
67 mapvbo.c \
68 minmag.c \
69 mipgen.c \
70 mipmap_comp.c \
71 mipmap_comp_tests.c \
72 mipmap_limits.c \
73 mipmap_view.c \
74 multipal.c \
75 multitexarray.c \
76 multiwindow.c \
77 no_s3tc.c \
78 packedpixels.c \
79 pbo.c \
80 persp_hint.c \
81 prim.c \
82 prog_parameter.c \
83 quads.c \
84 random.c \
85 readrate.c \
86 rubberband.c \
87 scissor.c \
88 scissor-viewport.c \
89 seccolor.c \
90 shader_api.c \
91 sharedtex.c \
92 stencil_twoside.c \
93 stencilwrap.c \
94 stencil_wrap.c \
95 streaming_rect \
96 subtex \
97 subtexrate.c \
98 tex1d.c \
99 texcmp.c \
100 texcompress2.c \
101 texcompsub.c \
102 texdown \
103 texfilt.c \
104 texgenmix.c \
105 texleak.c \
106 texline.c \
107 texobj.c \
108 texobjshare.c \
109 texrect.c \
110 texwrap.c \
111 unfilledclip.c \
112 vao-01.c \
113 vao-02.c \
114 vparray.c \
115 vpeval.c \
116 vptest1.c \
117 vptest2.c \
118 vptest3.c \
119 vptorus.c \
120 vpwarpmesh.c \
121 yuvrect.c \
122 yuvsquare.c \
123 zbitmap.c \
124 zcomp.c \
125 zdrawpix.c \
126 zreaddraw.c
127
128 PROGS = $(SOURCES:%.c=%)
129
130 INCLUDES = -I. -I$(TOP)/include
131
132 UTIL_FILES = readtex.h readtex.c
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 ##### RULES #####
145
146 .SUFFIXES:
147 .SUFFIXES: .c
148
149 .c:
150 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
151
152 .c.o:
153 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
154
155 .S.o:
156 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
157
158 # auto code generation
159 getprocaddress: getprocaddress.c getproclist.h
160
161 getproclist.h: $(TOP)/src/mesa/glapi/gen/gl_API.xml getprocaddress.c getprocaddress.py
162 python getprocaddress.py > getproclist.h
163
164 arraytexture: arraytexture.o readtex.o
165 $(APP_CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
166
167 arraytexture.o: arraytexture.c readtex.h
168 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
169
170 afsmultiarb: afsmultiarb.o readtex.o
171 $(APP_CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
172
173 afsmultiarb.o: afsmultiarb.c readtex.h
174 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
175
176 bumpmap: bumpmap.o readtex.o
177 $(CC) $(CFLAGS) $(LDFLAGS) bumpmap.o readtex.o $(LIBS) -o $@
178
179 bumpmap.o: bumpmap.c readtex.h
180 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bumpmap.c -o $@
181
182 drawbuffers: drawbuffers.o
183 $(APP_CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
184
185 drawbuffers.o: drawbuffers.c extfuncs.h
186 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
187
188 texrect: texrect.o readtex.o
189 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
190
191 texrect.o: texrect.c readtex.h
192 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
193
194 bug_3195: bug_3195.o readtex.o
195 $(APP_CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
196
197 bug_3195.o: bug_3195.c readtex.h
198 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
199
200 invert: invert.o readtex.o
201 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
202
203 invert.o: invert.c readtex.h
204 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
205
206 mipmap_view: mipmap_view.o readtex.o
207 $(APP_CC) $(CFLAGS) mipmap_view.o readtex.o $(LIBS) -o $@
208
209 mipmap_view.o: mipmap_view.c readtex.h
210 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
211
212 mipmap_limits: mipmap_limits.o readtex.o
213 $(APP_CC) $(CFLAGS) mipmap_limits.o readtex.o $(LIBS) -o $@
214
215 mipmap_limits.o: mipmap_limits.c readtex.h
216 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
217
218 fillrate: fillrate.o readtex.o
219 $(APP_CC) $(CFLAGS) fillrate.o readtex.o $(LIBS) -o $@
220
221 fillrate.o: fillrate.c readtex.h
222 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
223
224
225
226
227 floattex: floattex.o readtex.o shaderutil.o
228 $(APP_CC) $(CFLAGS) $(LDFLAGS) floattex.o readtex.o shaderutil.o $(LIBS) -o $@
229
230 floattex.o: floattex.c readtex.h shaderutil.h
231 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) floattex.c -o $@
232
233
234 readtex.o: readtex.c
235 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
236
237 readtex.h: $(TOP)/progs/util/readtex.h
238 ln -s $(TOP)/progs/util/readtex.h .
239
240 readtex.c: $(TOP)/progs/util/readtex.c
241 ln -s $(TOP)/progs/util/readtex.c .
242
243
244
245 extfuncs.h: $(TOP)/progs/util/extfuncs.h
246 ln -s $(TOP)/progs/util/extfuncs.h .
247
248
249
250 shaderutil.c: $(TOP)/progs/util/shaderutil.c
251 cp $< .
252
253 shaderutil.h: $(TOP)/progs/util/shaderutil.h
254 cp $< .
255
256 shaderutil.o: shaderutil.c shaderutil.h
257 $(APP_CC) -c -I$(INCDIR) $(INCLUDES) $(CFLAGS) shaderutil.c
258
259
260
261 # Emacs tags
262 tags:
263 etags `find . -name \*.[ch]` `find ../include`