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