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