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