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.
8 include $(TOP)/configs/current
11 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
112 PROGS = $(SOURCES:%.c=%)
114 INCLUDES = -I. -I$(TOP)/include
116 UTIL_FILES = readtex.h readtex.c
121 default: $(UTIL_FILES) $(PROGS)
134 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
137 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
140 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
142 # auto code generation
143 getprocaddress: getprocaddress.c getproclist.h
145 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
146 python getprocaddress.py > getproclist.h
148 arraytexture: arraytexture.o readtex.o
149 $(APP_CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
151 arraytexture.o: arraytexture.c readtex.h
152 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
154 afsmultiarb: afsmultiarb.o readtex.o
155 $(APP_CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
157 afsmultiarb.o: afsmultiarb.c readtex.h
158 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
160 bumpmap: bumpmap.o readtex.o
161 $(CC) $(CFLAGS) $(LDFLAGS) bumpmap.o readtex.o $(LIBS) -o $@
163 bumpmap.o: bumpmap.c readtex.h
164 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bumpmap.c -o $@
166 drawbuffers: drawbuffers.o
167 $(APP_CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
169 drawbuffers.o: drawbuffers.c extfuncs.h
170 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
172 texrect: texrect.o readtex.o
173 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
175 texrect.o: texrect.c readtex.h
176 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
178 bug_3195: bug_3195.o readtex.o
179 $(APP_CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
181 bug_3195.o: bug_3195.c readtex.h
182 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
184 invert: invert.o readtex.o
185 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
187 invert.o: invert.c readtex.h
188 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
190 mipmap_view: mipmap_view.o readtex.o
191 $(APP_CC) $(CFLAGS) mipmap_view.o readtex.o $(LIBS) -o $@
193 mipmap_view.o: mipmap_view.c readtex.h
194 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
196 mipmap_limits: mipmap_limits.o readtex.o
197 $(APP_CC) $(CFLAGS) mipmap_limits.o readtex.o $(LIBS) -o $@
199 mipmap_limits.o: mipmap_limits.c readtex.h
200 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
202 fillrate: fillrate.o readtex.o
203 $(APP_CC) $(CFLAGS) fillrate.o readtex.o $(LIBS) -o $@
205 fillrate.o: fillrate.c readtex.h
206 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
211 floattex: floattex.o readtex.o shaderutil.o
212 $(APP_CC) $(CFLAGS) $(LDFLAGS) floattex.o readtex.o shaderutil.o $(LIBS) -o $@
214 floattex.o: floattex.c readtex.h shaderutil.h
215 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) floattex.c -o $@
219 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
221 readtex.h: $(TOP)/progs/util/readtex.h
222 ln -s $(TOP)/progs/util/readtex.h .
224 readtex.c: $(TOP)/progs/util/readtex.c
225 ln -s $(TOP)/progs/util/readtex.c .
229 extfuncs.h: $(TOP)/progs/util/extfuncs.h
230 ln -s $(TOP)/progs/util/extfuncs.h .
234 shaderutil.c: $(TOP)/progs/util/shaderutil.c
237 shaderutil.h: $(TOP)/progs/util/shaderutil.h
240 shaderutil.o: shaderutil.c shaderutil.h
241 $(APP_CC) -c -I$(INCDIR) $(INCLUDES) $(CFLAGS) shaderutil.c
247 etags `find . -name \*.[ch]` `find ../include`