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)
105 PROGS = $(SOURCES:%.c=%)
107 INCLUDES = -I. -I$(TOP)/include
109 UTIL_FILES = readtex.h readtex.c
114 default: $(UTIL_FILES) $(PROGS)
127 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
130 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
133 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
135 # auto code generation
136 getprocaddress: getprocaddress.c getproclist.h
138 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
139 python getprocaddress.py > getproclist.h
141 arraytexture: arraytexture.o readtex.o
142 $(APP_CC) $(CFLAGS) arraytexture.o readtex.o $(LIBS) -o $@
144 arraytexture.o: arraytexture.c readtex.h
145 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
147 afsmultiarb: afsmultiarb.o readtex.o
148 $(APP_CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
150 afsmultiarb.o: afsmultiarb.c readtex.h
151 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
153 bumpmap: bumpmap.o readtex.o
154 $(CC) $(CFLAGS) $(LDFLAGS) bumpmap.o readtex.o $(LIBS) -o $@
156 bumpmap.o: bumpmap.c readtex.h
157 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bumpmap.c -o $@
159 drawbuffers: drawbuffers.o
160 $(APP_CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
162 drawbuffers.o: drawbuffers.c extfuncs.h
163 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
165 texrect: texrect.o readtex.o
166 $(APP_CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
168 texrect.o: texrect.c readtex.h
169 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
171 bug_3195: bug_3195.o readtex.o
172 $(APP_CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
174 bug_3195.o: bug_3195.c readtex.h
175 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
177 invert: invert.o readtex.o
178 $(APP_CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
180 invert.o: invert.c readtex.h
181 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
183 mipmap_view: mipmap_view.o readtex.o
184 $(APP_CC) $(CFLAGS) mipmap_view.o readtex.o $(LIBS) -o $@
186 mipmap_view.o: mipmap_view.c readtex.h
187 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
189 mipmap_limits: mipmap_limits.o readtex.o
190 $(APP_CC) $(CFLAGS) mipmap_limits.o readtex.o $(LIBS) -o $@
192 mipmap_limits.o: mipmap_limits.c readtex.h
193 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
195 fillrate: fillrate.o readtex.o
196 $(APP_CC) $(CFLAGS) fillrate.o readtex.o $(LIBS) -o $@
198 fillrate.o: fillrate.c readtex.h
199 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
204 floattex: floattex.o readtex.o shaderutil.o
205 $(APP_CC) $(CFLAGS) $(LDFLAGS) floattex.o readtex.o shaderutil.o $(LIBS) -o $@
207 floattex.o: floattex.c readtex.h shaderutil.h
208 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) floattex.c -o $@
212 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) readtex.c -o $@
214 readtex.h: $(TOP)/progs/util/readtex.h
215 ln -s $(TOP)/progs/util/readtex.h .
217 readtex.c: $(TOP)/progs/util/readtex.c
218 ln -s $(TOP)/progs/util/readtex.c .
222 extfuncs.h: $(TOP)/progs/util/extfuncs.h
223 ln -s $(TOP)/progs/util/extfuncs.h .
227 shaderutil.c: $(TOP)/progs/util/shaderutil.c
230 shaderutil.h: $(TOP)/progs/util/shaderutil.h
233 shaderutil.o: shaderutil.c shaderutil.h
234 $(APP_CC) -c -I$(INCDIR) $(INCLUDES) $(CFLAGS) shaderutil.c
240 etags `find . -name \*.[ch]` `find ../include`