Merge branch 'radeon-rewrite' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa...
[mesa.git] / progs / trivial / 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 $(GLEW_LIB) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 SOURCES = \
14 clear-fbo-tex.c \
15 clear-fbo.c \
16 clear-scissor.c \
17 clear-undefined.c \
18 clear-repeat.c \
19 clear-random.c \
20 clear.c \
21 dlist-dangling.c \
22 dlist-edgeflag-dangling.c \
23 dlist-edgeflag.c \
24 dlist-degenerate.c \
25 drawarrays.c \
26 draw2arrays.c \
27 drawelements.c \
28 drawrange.c \
29 flat-clip.c \
30 fs-tri.c \
31 line-clip.c \
32 line-cull.c \
33 line-smooth.c \
34 line-stipple-wide.c \
35 line-userclip-clip.c \
36 line-userclip-nop-clip.c \
37 line-userclip-nop.c \
38 line-userclip.c \
39 line-wide.c \
40 line.c \
41 lineloop-clip.c \
42 lineloop-elts.c \
43 lineloop.c \
44 linestrip-flat-stipple.c \
45 linestrip-stipple-wide.c \
46 linestrip-stipple.c \
47 linestrip.c \
48 long-fixed-func.c \
49 pgon-mode.c \
50 point-clip.c \
51 point-param.c \
52 point-sprite.c \
53 point-wide.c \
54 point-wide-smooth.c \
55 point.c \
56 poly-flat.c \
57 poly-flat-clip.c \
58 poly-flat-unfilled-clip.c \
59 poly-unfilled.c \
60 poly.c \
61 quad-clip-all-vertices.c \
62 quad-clip-nearplane.c \
63 quad-clip.c \
64 quad-degenerate.c \
65 quad-flat.c \
66 quad-offset-factor.c \
67 quad-offset-unfilled.c \
68 quad-offset-units.c \
69 quad-tex-2d.c \
70 quad-tex-3d.c \
71 quad-tex-alpha.c \
72 quad-tex-pbo.c \
73 quad-tex-sub.c \
74 quad-unfilled-clip.c \
75 quad-unfilled-stipple.c \
76 quad-unfilled.c \
77 quad.c \
78 quads.c \
79 quadstrip-clip.c \
80 quadstrip-cont.c \
81 quadstrip-flat.c \
82 quadstrip.c \
83 tri-alpha.c \
84 tri-array-interleaved.c \
85 tri-blend-color.c \
86 tri-blend-max.c \
87 tri-blend-min.c \
88 tri-blend-revsub.c \
89 tri-blend-sub.c \
90 tri-blend.c \
91 tri-clip.c \
92 tri-cull-both.c \
93 tri-cull.c \
94 tri-logicop-none.c \
95 tri-logicop-xor.c \
96 tri-dlist.c \
97 tri-edgeflag.c \
98 tri-fbo-tex-mip.c \
99 tri-fbo-tex.c \
100 tri-fbo.c \
101 tri-flat-clip.c \
102 tri-flat.c \
103 tri-fog.c \
104 tri-fp.c \
105 tri-fp-const-imm.c \
106 tri-lit.c \
107 tri-mask-tri.c \
108 tri-orig.c \
109 tri-query.c \
110 tri-repeat.c \
111 tri-scissor-tri.c \
112 tri-stencil.c \
113 tri-stipple.c \
114 tri-multitex-vbo.c \
115 tri-tex.c \
116 tri-tex-3d.c \
117 tri-tri.c \
118 tri-unfilled-fog.c \
119 tri-unfilled-edgeflag.c \
120 tri-unfilled-clip.c \
121 tri-unfilled-smooth.c \
122 tri-unfilled-tri.c \
123 tri-unfilled-tri-lit.c \
124 tri-unfilled-userclip-stip.c \
125 tri-unfilled-userclip.c \
126 tri-unfilled.c \
127 tri-userclip.c \
128 tri-viewport.c \
129 tri-z-eq.c \
130 tri-z.c \
131 tri.c \
132 trifan-flat.c \
133 trifan-flat-clip.c \
134 trifan-flat-unfilled-clip.c \
135 trifan-unfilled.c \
136 trifan.c \
137 tristrip-clip.c \
138 tristrip-flat.c \
139 tristrip.c \
140 vbo-drawarrays.c \
141 vbo-drawelements.c \
142 vbo-drawrange.c \
143 vp-array.c \
144 vp-array-int.c \
145 vp-clip.c \
146 vp-line-clip.c \
147 vp-tri.c \
148 vp-tri-swap.c \
149 vp-tri-tex.c \
150 vp-tri-imm.c \
151 vp-tri-cb.c \
152 vp-tri-cb-pos.c \
153 vp-tri-cb-tex.c \
154 vp-unfilled.c
155
156 PROGS = $(SOURCES:%.c=%)
157
158 INCLUDES = -I. -I$(TOP)/include -I../samples
159
160 UTIL_FILES = readtex.h readtex.c
161
162
163 ##### RULES #####
164
165 .SUFFIXES:
166 .SUFFIXES: .c
167
168 .c:
169 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
170
171 .c.o:
172 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
173
174 .S.o:
175 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
176
177
178 ##### TARGETS #####
179
180 default: $(UTIL_FILES) $(PROGS)
181
182 clean:
183 -rm -f $(PROGS)
184 -rm -f *.o
185 -rm -f getproclist.h
186
187
188 # auto code generation
189 getprocaddress: getprocaddress.c getproclist.h
190
191 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
192 python getprocaddress.py > getproclist.h
193
194
195 texrect: texrect.o readtex.o
196 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
197
198 texrect.o: texrect.c readtex.h
199 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
200
201 invert: invert.o readtex.o
202 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
203
204 invert.o: invert.c readtex.h
205 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
206
207 readtex.o: readtex.c
208 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
209
210
211 readtex.h: $(TOP)/progs/util/readtex.h
212 ln -s $(TOP)/progs/util/readtex.h .
213
214 readtex.c: $(TOP)/progs/util/readtex.c
215 ln -s $(TOP)/progs/util/readtex.c .
216
217
218 fs-tri: fs-tri.c extfuncs.h
219
220
221 extfuncs.h: $(TOP)/progs/util/extfuncs.h
222 cp $< .
223
224
225 # Emacs tags
226 tags:
227 etags `find . -name \*.[ch]` `find ../include`