test flat shading w/ clipping
[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.c \
15 clear-scissor.c \
16 flat-clip.c \
17 fs-tri.c \
18 line-clip.c \
19 line-cull.c \
20 line-userclip-clip.c \
21 line-userclip-nop-clip.c \
22 line-userclip-nop.c \
23 line-userclip.c \
24 line.c \
25 lineloop-clip.c \
26 lineloop.c \
27 point.c \
28 point-clip.c \
29 point-param.c \
30 point-wide.c \
31 poly-flat.c \
32 poly-unfilled.c \
33 poly.c \
34 quad-clip.c \
35 quad-clip-all-vertices.c \
36 quad-clip-nearplane.c \
37 quad-degenerate.c \
38 quad-flat.c \
39 quad-offset-factor.c \
40 quad-offset-units.c \
41 quad-offset-unfilled.c \
42 quad-unfilled.c \
43 quad-tex-2d.c \
44 quad-tex-pbo.c \
45 quad-tex-3d.c \
46 quad.c \
47 quads.c \
48 quadstrip.c \
49 quadstrip-flat.c \
50 readpixels.c \
51 dlist-edgeflag.c \
52 dlist-dangling.c \
53 dlist-edgeflag-dangling.c \
54 drawrange.c \
55 drawelements.c \
56 drawarrays.c \
57 tri-blend.c \
58 tri-tex-3d.c \
59 tri-clip.c \
60 tri-cull.c \
61 tri-edgeflag.c \
62 tri-flat-clip.c \
63 tri-flat.c \
64 tri-unfilled-clip.c \
65 tri-unfilled-smooth.c \
66 tri-unfilled-userclip.c \
67 tri-unfilled.c \
68 tri-userclip.c \
69 tri-dlist.c \
70 tri-z.c \
71 tri.c \
72 tristrip-clip.c \
73 tristrip.c \
74 vbo-drawrange.c \
75 vbo-drawelements.c \
76 vbo-drawarrays.c \
77 vp-clip.c \
78 vp-tri.c \
79 vp-line-clip.c \
80 vp-unfilled.c \
81 vp-array.c
82
83 PROGS = $(SOURCES:%.c=%)
84
85 INCLUDES = -I. -I$(TOP)/include -I../samples
86
87 UTIL_FILES = readtex.h readtex.c
88
89
90 ##### RULES #####
91
92 .SUFFIXES:
93 .SUFFIXES: .c
94
95 .c:
96 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
97
98 .c.o:
99 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
100
101 .S.o:
102 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
103
104
105 ##### TARGETS #####
106
107 default: $(UTIL_FILES) $(PROGS)
108
109 clean:
110 rm -f $(PROGS)
111 rm -f *.o
112 rm -f getproclist.h
113
114
115 # auto code generation
116 getprocaddress: getprocaddress.c getproclist.h
117
118 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
119 python getprocaddress.py > getproclist.h
120
121
122 texrect: texrect.o readtex.o
123 $(CC) texrect.o readtex.o $(LIBS) -o $@
124
125 texrect.o: texrect.c readtex.h
126 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
127
128 invert: invert.o readtex.o
129 $(CC) invert.o readtex.o $(LIBS) -o $@
130
131 invert.o: invert.c readtex.h
132 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
133
134 readtex.o: readtex.c
135 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
136
137
138 readtex.h: $(TOP)/progs/util/readtex.h
139 ln -s $(TOP)/progs/util/readtex.h .
140
141 readtex.c: $(TOP)/progs/util/readtex.c
142 ln -s $(TOP)/progs/util/readtex.c .
143
144
145 fs-tri: fs-tri.c extfuncs.h
146
147
148 extfuncs.h: $(TOP)/progs/util/extfuncs.h
149 cp $< .
150
151
152 # Emacs tags
153 tags:
154 etags `find . -name \*.[ch]` `find ../include`