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