7bf64e19e40d5d0dd509149b392a887ea0f6d8b4
[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 = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(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 exactrast.c \
39 floattex.c \
40 fbotest1.c \
41 fbotest2.c \
42 fbotexture.c \
43 fog.c \
44 fogcoord.c \
45 fptest1.c \
46 fptexture.c \
47 getprocaddress.c \
48 interleave.c \
49 invert.c \
50 jkrahntest.c \
51 manytex.c \
52 minmag.c \
53 mipmap_limits.c \
54 multipal.c \
55 no_s3tc.c \
56 packedpixels.c \
57 pbo.c \
58 prog_parameter.c \
59 projtex.c \
60 random.c \
61 readrate.c \
62 seccolor.c \
63 shader_api.c \
64 sharedtex.c \
65 stencil_twoside.c \
66 stencilwrap.c \
67 stencil_wrap.c \
68 subtexrate.c \
69 tex1d.c \
70 texcompress2.c \
71 texfilt.c \
72 texline.c \
73 texobjshare.c \
74 texrect.c \
75 texwrap.c \
76 vao-01.c \
77 vao-02.c \
78 vparray.c \
79 vptest1.c \
80 vptest2.c \
81 vptest3.c \
82 vptorus.c \
83 vpwarpmesh.c \
84 yuvrect.c \
85 yuvsquare.c \
86 zreaddraw.c
87
88 PROGS = $(SOURCES:%.c=%)
89
90 INCLUDES = -I. -I$(TOP)/include
91
92 UTIL_FILES = readtex.h readtex.c
93
94
95 ##### TARGETS #####
96
97 default: $(UTIL_FILES) $(PROGS)
98
99 clean:
100 rm -f $(PROGS)
101 rm -f *.o
102 rm -f getproclist.h
103
104 ##### RULES #####
105
106 .SUFFIXES:
107 .SUFFIXES: .c
108
109 .c:
110 $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
111
112 .c.o:
113 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
114
115 .S.o:
116 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
117
118 # auto code generation
119 getprocaddress: getprocaddress.c getproclist.h
120
121 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
122 python getprocaddress.py > getproclist.h
123
124 arraytexture: arraytexture.o readtex.o
125 $(CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
126
127 arraytexture.o: arraytexture.c readtex.h
128 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
129
130 afsmultiarb: afsmultiarb.o readtex.o
131 $(CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
132
133 afsmultiarb.o: afsmultiarb.c readtex.h
134 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
135
136 drawbuffers: drawbuffers.o
137 $(CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
138
139 drawbuffers.o: drawbuffers.c extfuncs.h
140 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
141
142 texrect: texrect.o readtex.o
143 $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
144
145 texrect.o: texrect.c readtex.h
146 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
147
148 bug_3195: bug_3195.o readtex.o
149 $(CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
150
151 bug_3195.o: bug_3195.c readtex.h
152 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
153
154 invert: invert.o readtex.o
155 $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
156
157 invert.o: invert.c readtex.h
158 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
159
160 readtex.o: readtex.c
161 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
162
163
164 readtex.h: $(TOP)/progs/util/readtex.h
165 ln -s $(TOP)/progs/util/readtex.h .
166
167 readtex.c: $(TOP)/progs/util/readtex.c
168 ln -s $(TOP)/progs/util/readtex.c .
169
170 extfuncs.h: $(TOP)/progs/util/extfuncs.h
171 ln -s $(TOP)/progs/util/extfuncs.h .
172
173
174
175 # Emacs tags
176 tags:
177 etags `find . -name \*.[ch]` `find ../include`