454b0adf9c18020ad4d3aa7579f633a08f81f3c5
[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 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 ##### TARGETS #####
92
93 default: $(UTIL_FILES) $(PROGS)
94
95 clean:
96 rm -f $(PROGS)
97 rm -f *.o
98 rm -f getproclist.h
99
100 ##### RULES #####
101
102 .SUFFIXES:
103 .SUFFIXES: .c
104
105 .c:
106 $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
107
108 .c.o:
109 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
110
111 .S.o:
112 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
113
114 # auto code generation
115 getprocaddress: getprocaddress.c getproclist.h
116
117 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
118 python getprocaddress.py > getproclist.h
119
120 arraytexture: arraytexture.o readtex.o
121 $(CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
122
123 arraytexture.o: arraytexture.c readtex.h
124 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
125
126 afsmultiarb: afsmultiarb.o readtex.o
127 $(CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
128
129 afsmultiarb.o: afsmultiarb.c readtex.h
130 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
131
132 drawbuffers: drawbuffers.o
133 $(CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
134
135 drawbuffers.o: drawbuffers.c extfuncs.h
136 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
137
138 texrect: texrect.o readtex.o
139 $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
140
141 texrect.o: texrect.c readtex.h
142 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
143
144 bug_3195: bug_3195.o readtex.o
145 $(CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
146
147 bug_3195.o: bug_3195.c readtex.h
148 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
149
150 invert: invert.o readtex.o
151 $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
152
153 invert.o: invert.c readtex.h
154 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
155
156 readtex.o: readtex.c
157 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
158
159
160 readtex.h: $(TOP)/progs/util/readtex.h
161 ln -s $(TOP)/progs/util/readtex.h .
162
163 readtex.c: $(TOP)/progs/util/readtex.c
164 ln -s $(TOP)/progs/util/readtex.c .
165
166 extfuncs.h: $(TOP)/progs/util/extfuncs.h
167 ln -s $(TOP)/progs/util/extfuncs.h .
168
169
170
171 # Emacs tags
172 tags:
173 etags `find . -name \*.[ch]` `find ../include`