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