Merge commit 'origin/master' 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-array-interleaved.c \
81 tri-blend-color.c \
82 tri-blend-max.c \
83 tri-blend-min.c \
84 tri-blend-revsub.c \
85 tri-blend-sub.c \
86 tri-blend.c \
87 tri-clip.c \
88 tri-cull-both.c \
89 tri-cull.c \
90 tri-dlist.c \
91 tri-edgeflag.c \
92 tri-fbo-tex.c \
93 tri-fbo.c \
94 tri-flat-clip.c \
95 tri-flat.c \
96 tri-fog.c \
97 tri-fp.c \
98 tri-fp-const-imm.c \
99 tri-lit.c \
100 tri-mask-tri.c \
101 tri-orig.c \
102 tri-query.c \
103 tri-repeat.c \
104 tri-scissor-tri.c \
105 tri-stencil.c \
106 tri-stipple.c \
107 tri-tex.c \
108 tri-tex-3d.c \
109 tri-tri.c \
110 tri-unfilled-edgeflag.c \
111 tri-unfilled-clip.c \
112 tri-unfilled-smooth.c \
113 tri-unfilled-tri.c \
114 tri-unfilled-tri-lit.c \
115 tri-unfilled-userclip-stip.c \
116 tri-unfilled-userclip.c \
117 tri-unfilled.c \
118 tri-userclip.c \
119 tri-z-eq.c \
120 tri-z.c \
121 tri.c \
122 trifan-flat.c \
123 trifan-flat-clip.c \
124 trifan-flat-unfilled-clip.c \
125 trifan-unfilled.c \
126 trifan.c \
127 tristrip-clip.c \
128 tristrip-flat.c \
129 tristrip.c \
130 vbo-drawarrays.c \
131 vbo-drawelements.c \
132 vbo-drawrange.c \
133 vp-array.c \
134 vp-array-int.c \
135 vp-clip.c \
136 vp-line-clip.c \
137 vp-tri.c \
138 vp-tri-swap.c \
139 vp-tri-tex.c \
140 vp-tri-imm.c \
141 vp-tri-cb.c \
142 vp-tri-cb-pos.c \
143 vp-tri-cb-tex.c \
144 vp-unfilled.c
145
146 PROGS = $(SOURCES:%.c=%)
147
148 INCLUDES = -I. -I$(TOP)/include -I../samples
149
150 UTIL_FILES = readtex.h readtex.c
151
152
153 ##### RULES #####
154
155 .SUFFIXES:
156 .SUFFIXES: .c
157
158 .c:
159 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
160
161 .c.o:
162 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
163
164 .S.o:
165 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
166
167
168 ##### TARGETS #####
169
170 default: $(UTIL_FILES) $(PROGS)
171
172 clean:
173 -rm -f $(PROGS)
174 -rm -f *.o
175 -rm -f getproclist.h
176
177
178 # auto code generation
179 getprocaddress: getprocaddress.c getproclist.h
180
181 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
182 python getprocaddress.py > getproclist.h
183
184
185 texrect: texrect.o readtex.o
186 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
187
188 texrect.o: texrect.c readtex.h
189 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
190
191 invert: invert.o readtex.o
192 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
193
194 invert.o: invert.c readtex.h
195 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
196
197 readtex.o: readtex.c
198 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
199
200
201 readtex.h: $(TOP)/progs/util/readtex.h
202 ln -s $(TOP)/progs/util/readtex.h .
203
204 readtex.c: $(TOP)/progs/util/readtex.c
205 ln -s $(TOP)/progs/util/readtex.c .
206
207
208 fs-tri: fs-tri.c extfuncs.h
209
210
211 extfuncs.h: $(TOP)/progs/util/extfuncs.h
212 cp $< .
213
214
215 # Emacs tags
216 tags:
217 etags `find . -name \*.[ch]` `find ../include`