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