Merge remote branch 'origin/master' into lp-binning
[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 drawbuffers.c \
45 drawbuffers2.c \
46 exactrast.c \
47 ext422square.c \
48 floattex.c \
49 fbotest1.c \
50 fbotest2.c \
51 fillrate.c \
52 fog.c \
53 fogcoord.c \
54 fptest1.c \
55 fptexture.c \
56 getprocaddress.c \
57 getteximage.c \
58 glutfx.c \
59 interleave.c \
60 invert.c \
61 jkrahntest.c \
62 lineclip.c \
63 manytex.c \
64 mapbufrange.c \
65 mapvbo.c \
66 minmag.c \
67 mipgen.c \
68 mipmap_comp.c \
69 mipmap_comp_tests.c \
70 mipmap_limits.c \
71 mipmap_view.c \
72 multipal.c \
73 multitexarray.c \
74 multiwindow.c \
75 no_s3tc.c \
76 packedpixels.c \
77 pbo.c \
78 persp_hint.c \
79 prim.c \
80 prog_parameter.c \
81 quads.c \
82 random.c \
83 readrate.c \
84 rubberband.c \
85 scissor.c \
86 scissor-viewport.c \
87 seccolor.c \
88 shader_api.c \
89 sharedtex.c \
90 stencil_twoside.c \
91 stencilwrap.c \
92 stencil_wrap.c \
93 streaming_rect \
94 subtex \
95 subtexrate.c \
96 tex1d.c \
97 texcmp.c \
98 texcompress2.c \
99 texcompsub.c \
100 texdown \
101 texfilt.c \
102 texgenmix.c \
103 texleak.c \
104 texline.c \
105 texobj.c \
106 texobjshare.c \
107 texrect.c \
108 texwrap.c \
109 unfilledclip.c \
110 vao-01.c \
111 vao-02.c \
112 vparray.c \
113 vpeval.c \
114 vptest1.c \
115 vptest2.c \
116 vptest3.c \
117 vptorus.c \
118 vpwarpmesh.c \
119 yuvrect.c \
120 yuvsquare.c \
121 zcomp.c \
122 zdrawpix.c \
123 zreaddraw.c
124
125 PROGS = $(SOURCES:%.c=%)
126
127 INCLUDES = -I. -I$(TOP)/include
128
129 UTIL_FILES = readtex.h readtex.c
130
131
132 ##### TARGETS #####
133
134 default: $(UTIL_FILES) $(PROGS)
135
136 clean:
137 -rm -f $(PROGS)
138 -rm -f *.o
139 -rm -f getproclist.h
140
141 ##### RULES #####
142
143 .SUFFIXES:
144 .SUFFIXES: .c
145
146 .c:
147 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
148
149 .c.o:
150 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
151
152 .S.o:
153 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
154
155 # auto code generation
156 getprocaddress: getprocaddress.c getproclist.h
157
158 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
159 python getprocaddress.py > getproclist.h
160
161 arraytexture: arraytexture.o readtex.o
162 $(APP_CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
163
164 arraytexture.o: arraytexture.c readtex.h
165 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
166
167 afsmultiarb: afsmultiarb.o readtex.o
168 $(APP_CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
169
170 afsmultiarb.o: afsmultiarb.c readtex.h
171 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
172
173 bumpmap: bumpmap.o readtex.o
174 $(CC) $(CFLAGS) $(LDFLAGS) bumpmap.o readtex.o $(LIBS) -o $@
175
176 bumpmap.o: bumpmap.c readtex.h
177 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bumpmap.c -o $@
178
179 drawbuffers: drawbuffers.o
180 $(APP_CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
181
182 drawbuffers.o: drawbuffers.c extfuncs.h
183 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
184
185 texrect: texrect.o readtex.o
186 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
187
188 texrect.o: texrect.c readtex.h
189 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
190
191 bug_3195: bug_3195.o readtex.o
192 $(APP_CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
193
194 bug_3195.o: bug_3195.c readtex.h
195 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
196
197 invert: invert.o readtex.o
198 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
199
200 invert.o: invert.c readtex.h
201 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
202
203 mipmap_view: mipmap_view.o readtex.o
204 $(APP_CC) $(CFLAGS) mipmap_view.o readtex.o $(LIBS) -o $@
205
206 mipmap_view.o: mipmap_view.c readtex.h
207 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
208
209 mipmap_limits: mipmap_limits.o readtex.o
210 $(APP_CC) $(CFLAGS) mipmap_limits.o readtex.o $(LIBS) -o $@
211
212 mipmap_limits.o: mipmap_limits.c readtex.h
213 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
214
215 fillrate: fillrate.o readtex.o
216 $(APP_CC) $(CFLAGS) fillrate.o readtex.o $(LIBS) -o $@
217
218 fillrate.o: fillrate.c readtex.h
219 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
220
221
222
223
224 floattex: floattex.o readtex.o shaderutil.o
225 $(APP_CC) $(CFLAGS) $(LDFLAGS) floattex.o readtex.o shaderutil.o $(LIBS) -o $@
226
227 floattex.o: floattex.c readtex.h shaderutil.h
228 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) floattex.c -o $@
229
230
231 readtex.o: readtex.c
232 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
233
234 readtex.h: $(TOP)/progs/util/readtex.h
235 ln -s $(TOP)/progs/util/readtex.h .
236
237 readtex.c: $(TOP)/progs/util/readtex.c
238 ln -s $(TOP)/progs/util/readtex.c .
239
240
241
242 extfuncs.h: $(TOP)/progs/util/extfuncs.h
243 ln -s $(TOP)/progs/util/extfuncs.h .
244
245
246
247 shaderutil.c: $(TOP)/progs/util/shaderutil.c
248 cp $< .
249
250 shaderutil.h: $(TOP)/progs/util/shaderutil.h
251 cp $< .
252
253 shaderutil.o: shaderutil.c shaderutil.h
254 $(APP_CC) -c -I$(INCDIR) $(INCLUDES) $(CFLAGS) shaderutil.c
255
256
257
258 # Emacs tags
259 tags:
260 etags `find . -name \*.[ch]` `find ../include`