Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
[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 = $(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 bufferobj.c \
30 bug_3050.c \
31 bug_3101.c \
32 bug_3195.c \
33 calibrate_rast.c \
34 copypixrate.c \
35 crossbar.c \
36 cva.c \
37 dinoshade.c \
38 drawbuffers.c \
39 floattex.c \
40 fbotest1.c \
41 fbotest2.c \
42 fbotexture.c \
43 fog.c \
44 fogcoord.c \
45 fptest1.c \
46 fptexture.c \
47 getprocaddress.c \
48 interleave.c \
49 invert.c \
50 jkrahntest.c \
51 manytex.c \
52 minmag.c \
53 mipmap_limits.c \
54 mipmap_view.c \
55 multipal.c \
56 no_s3tc.c \
57 packedpixels.c \
58 pbo.c \
59 prog_parameter.c \
60 projtex.c \
61 random.c \
62 readrate.c \
63 seccolor.c \
64 sharedtex.c \
65 stencilwrap.c \
66 stencil_wrap.c \
67 subtex \
68 subtexrate.c \
69 tex1d.c \
70 texcompress2.c \
71 texfilt.c \
72 texline.c \
73 texobjshare.c \
74 texrect.c \
75 texwrap.c \
76 vao-01.c \
77 vao-02.c \
78 vparray.c \
79 vptest1.c \
80 vptest2.c \
81 vptest3.c \
82 vptorus.c \
83 vpwarpmesh.c \
84 yuvrect.c \
85 yuvsquare.c \
86 zreaddraw.c
87
88 PROGS = $(SOURCES:%.c=%)
89
90 INCLUDES = -I. -I$(TOP)/include
91
92 UTIL_FILES = readtex.h readtex.c
93
94
95 ##### RULES #####
96
97 .SUFFIXES:
98 .SUFFIXES: .c
99
100 .c:
101 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
102
103 .c.o:
104 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
105
106 .S.o:
107 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
108
109
110 ##### TARGETS #####
111
112 default: $(UTIL_FILES) $(PROGS)
113
114 clean:
115 rm -f $(PROGS)
116 rm -f *.o
117 rm -f getproclist.h
118
119
120 # auto code generation
121 getprocaddress: getprocaddress.c getproclist.h
122
123 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
124 python getprocaddress.py > getproclist.h
125
126 arraytexture: arraytexture.o readtex.o
127 $(CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
128
129 arraytexture.o: arraytexture.c readtex.h
130 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
131
132 afsmultiarb: afsmultiarb.o readtex.o
133 $(CC) $(CFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
134
135 afsmultiarb.o: afsmultiarb.c readtex.h
136 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
137
138 drawbuffers: drawbuffers.o
139 $(CC) $(CFLAGS) drawbuffers.o $(LIBS) -o $@
140
141 drawbuffers.o: drawbuffers.c extfuncs.h
142 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
143
144 texrect: texrect.o readtex.o
145 $(CC) $(CFLAGS) texrect.o readtex.o $(LIBS) -o $@
146
147 texrect.o: texrect.c readtex.h
148 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
149
150 bug_3195: bug_3195.o readtex.o
151 $(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
152
153 bug_3195.o: bug_3195.c readtex.h
154 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
155
156 invert: invert.o readtex.o
157 $(CC) $(CFLAGS) invert.o readtex.o $(LIBS) -o $@
158
159 invert.o: invert.c readtex.h
160 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
161
162 mipmap_view: mipmap_view.o readtex.o
163 $(CC) $(CFLAGS) mipmap_view.o readtex.o $(LIBS) -o $@
164
165 mipmap_view.o: mipmap_view.c readtex.h
166 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
167
168
169
170 readtex.o: readtex.c
171 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
172
173
174 readtex.h: $(TOP)/progs/util/readtex.h
175 ln -s $(TOP)/progs/util/readtex.h .
176
177 readtex.c: $(TOP)/progs/util/readtex.c
178 ln -s $(TOP)/progs/util/readtex.c .
179
180 extfuncs.h: $(TOP)/progs/util/extfuncs.h
181 ln -s $(TOP)/progs/util/extfuncs.h .
182
183
184
185 # Emacs tags
186 tags:
187 etags `find . -name \*.[ch]` `find ../include`