Fix malloc size buf, silence signed/unsigned comparision warning
[mesa.git] / progs / tests / 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 afsmultiarb.c \
15 antialias.c \
16 arbfpspec.c \
17 arbfptest1.c \
18 arbfptexture.c \
19 arbfptrig.c \
20 arbnpot.c \
21 arbnpot-mipmap.c \
22 arbvptest1.c \
23 arbvptest3.c \
24 arbvptorus.c \
25 arbvpwarpmesh.c \
26 arraytexture.c \
27 blendminmax.c \
28 blendsquare.c \
29 bufferobj.c \
30 bug_3050.c \
31 bug_3101.c \
32 bug_3195.c \
33 copypixrate.c \
34 crossbar.c \
35 cva.c \
36 dinoshade.c \
37 drawbuffers.c \
38 floattex.c \
39 fbotest1.c \
40 fbotest2.c \
41 fbotexture.c \
42 fog.c \
43 fogcoord.c \
44 fptest1.c \
45 fptexture.c \
46 getprocaddress.c \
47 interleave.c \
48 invert.c \
49 jkrahntest.c \
50 manytex.c \
51 mipmap_limits.c \
52 multipal.c \
53 no_s3tc.c \
54 packedpixels.c \
55 pbo.c \
56 prog_parameter.c \
57 projtex.c \
58 random.c \
59 readrate.c \
60 seccolor.c \
61 sharedtex.c \
62 stencilwrap.c \
63 stencil_wrap.c \
64 subtexrate.c \
65 tex1d.c \
66 texcompress2.c \
67 texfilt.c \
68 texline.c \
69 texobjshare.c \
70 texrect.c \
71 texwrap.c \
72 vao-01.c \
73 vao-02.c \
74 vparray.c \
75 vptest1.c \
76 vptest2.c \
77 vptest3.c \
78 vptorus.c \
79 vpwarpmesh.c \
80 yuvrect.c \
81 yuvsquare.c \
82 zreaddraw.c
83
84 PROGS = $(SOURCES:%.c=%)
85
86 INCLUDES = -I. -I$(TOP)/include
87
88 UTIL_FILES = readtex.h readtex.c
89
90
91 ##### RULES #####
92
93 .SUFFIXES:
94 .SUFFIXES: .c
95
96 .c:
97 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
98
99 .c.o:
100 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
101
102 .S.o:
103 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
104
105
106 ##### TARGETS #####
107
108 default: $(UTIL_FILES) $(PROGS)
109
110 clean:
111 rm -f $(PROGS)
112 rm -f *.o
113 rm -f getproclist.h
114
115
116 # auto code generation
117 getprocaddress: getprocaddress.c getproclist.h
118
119 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
120 python getprocaddress.py > getproclist.h
121
122 arraytexture: arraytexture.o readtex.o
123 $(CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
124
125 arraytexture.o: arraytexture.c readtex.h
126 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
127
128 afsmultiarb: afsmultiarb.o readtex.o
129 $(CC) $(CFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
130
131 afsmultiarb.o: afsmultiarb.c readtex.h
132 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
133
134 drawbuffers: drawbuffers.o
135 $(CC) $(CFLAGS) drawbuffers.o $(LIBS) -o $@
136
137 drawbuffers.o: drawbuffers.c extfuncs.h
138 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
139
140 texrect: texrect.o readtex.o
141 $(CC) $(CFLAGS) texrect.o readtex.o $(LIBS) -o $@
142
143 texrect.o: texrect.c readtex.h
144 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
145
146 bug_3195: bug_3195.o readtex.o
147 $(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
148
149 bug_3195.o: bug_3195.c readtex.h
150 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
151
152 invert: invert.o readtex.o
153 $(CC) $(CFLAGS) invert.o readtex.o $(LIBS) -o $@
154
155 invert.o: invert.c readtex.h
156 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
157
158 readtex.o: readtex.c
159 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
160
161
162 readtex.h: $(TOP)/progs/util/readtex.h
163 ln -s $(TOP)/progs/util/readtex.h .
164
165 readtex.c: $(TOP)/progs/util/readtex.c
166 ln -s $(TOP)/progs/util/readtex.c .
167
168 extfuncs.h: $(TOP)/progs/util/extfuncs.h
169 ln -s $(TOP)/progs/util/extfuncs.h .
170
171
172
173 # Emacs tags
174 tags:
175 etags `find . -name \*.[ch]` `find ../include`