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