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