intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
[mesa.git] / progs / glsl / Makefile
index c5d62d2370dadee135e75cbfd1597a45b8f16910..f97cdb69429f289166652a295fb6f21027ec59f9 100644 (file)
@@ -5,39 +5,69 @@ include $(TOP)/configs/current
 
 INCDIR = $(TOP)/include
 
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = \
+       $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) \
+       $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
+       $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
 
 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
 
-PROGS = \
-       bitmap \
-       brick \
-       bump \
-       convolutions \
-       deriv \
-       identity \
-       mandelbrot \
-       multitex \
-       noise \
-       points \
-       pointcoord \
-       skinning \
-       texdemo1 \
-       toyball \
-       twoside \
-       trirast \
-       texdemo1 
+INCLUDE_DIRS = -I$(TOP)/progs/util
+
+DEMO_SOURCES = \
+       array.c \
+       bitmap.c \
+       brick.c \
+       bump.c \
+       convolutions.c \
+       deriv.c \
+       fragcoord.c \
+       identity.c \
+       linktest.c \
+       mandelbrot.c \
+       multinoise.c \
+       multitex.c \
+       noise.c \
+       noise2.c \
+       pointcoord.c \
+       points.c \
+       samplers.c \
+       shadow_sampler.c \
+       skinning.c \
+       texaaline.c \
+       texdemo1.c \
+       toyball.c \
+       trirast.c \
+       twoside.c \
+       vert-or-frag-only.c \
+       vert-tex.c
+
+UTIL_HEADERS = \
+       extfuncs.h \
+       shaderutil.h \
+       readtex.h
+
+UTIL_SOURCES = \
+       shaderutil.c \
+       readtex.c
+
+UTIL_OBJS = $(UTIL_SOURCES:.c=.o)
+
+
+PROGS = $(DEMO_SOURCES:%.c=%)
+
 
 
 ##### RULES #####
 
-.SUFFIXES:
-.SUFFIXES: .c
+# make .o file from .c file:
+.c.o:
+       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) $< -o $@
 
 
-# make executable from .c file:
-.c: $(LIB_DEP)
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
+# make executable from .o files
+.o:
+       $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(UTIL_OBJS) $(LIBS) -o $@
 
 
 ##### TARGETS #####
@@ -45,148 +75,164 @@ PROGS = \
 default: $(PROGS)
 
 
+clean:
+       -rm -f $(PROGS)
+       -rm -f *.o *~
+       -rm -f extfuncs.h
+       -rm -f shaderutil.*
+       -rm -f readtex.*
+
+
 
 ##### Extra dependencies
 
-extfuncs.h:  $(TOP)/progs/util/extfuncs.h
+extfuncs.h: $(TOP)/progs/util/extfuncs.h
        cp $< .
 
-
 readtex.c: $(TOP)/progs/util/readtex.c
        cp $< .
 
 readtex.h: $(TOP)/progs/util/readtex.h
        cp $< .
 
-readtex.o: readtex.c readtex.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
-
-
 shaderutil.c: $(TOP)/progs/util/shaderutil.c
        cp $< .
 
 shaderutil.h: $(TOP)/progs/util/shaderutil.h
        cp $< .
 
-shaderutil.o: shaderutil.c shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) shaderutil.c
 
 
+array.o: $(UTIL_HEADERS)
 
-bitmap.o: bitmap.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) bitmap.c
+array: array.o  $(UTIL_OBJS)
 
-bitmap: bitmap.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bitmap.o shaderutil.o $(LIBS) -o $@
 
+bitmap.o: $(UTIL_HEADERS)
 
-brick.o: brick.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) brick.c
+bitmap: bitmap.o $(UTIL_OBJS)
 
-brick: brick.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) brick.o shaderutil.o $(LIBS) -o $@
 
+brick.o: $(UTIL_HEADERS)
 
-bump.o: bump.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) bump.c
+brick: brick.o $(UTIL_OBJS)
 
-bump: bump.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bump.o shaderutil.o $(LIBS) -o $@
 
+bump.o: $(UTIL_HEADERS)
 
-convolutions.o: convolutions.c readtex.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) convolutions.c
+bump: bump.o $(UTIL_OBJS)
 
-convolutions: convolutions.o readtex.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) convolutions.o readtex.o $(LIBS) -o $@
 
+convolutions.o: $(UTIL_HEADERS)
 
-deriv.o: deriv.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) deriv.c
+convolutions: convolutions.o $(UTIL_OBJS)
 
-deriv: deriv.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
 
+deriv.o: deriv.c $(UTIL_HEADERS)
 
-identity.o: identity.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) identity.c
+deriv: deriv.o $(UTIL_OBJS)
 
-identity: identity.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) identity.o shaderutil.o $(LIBS) -o $@
 
+identity.o: $(UTIL_HEADERS)
 
-mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
+identity: identity.o $(UTIL_OBJS)
 
-mandelbrot: mandelbrot.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) mandelbrot.o shaderutil.o $(LIBS) -o $@
 
-multitex.o: multitex.c extfuncs.h readtex.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) multitex.c
+fragcoord.o: $(UTIL_HEADERS)
 
-multitex: multitex.o readtex.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) multitex.o readtex.o shaderutil.o $(LIBS) -o $@
+fragcoord: fragcoord.o $(UTIL_OBJS)
 
 
-noise.o: noise.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) noise.c
+linktest.o: $(UTIL_HEADERS)
 
-noise: noise.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) noise.o shaderutil.o $(LIBS) -o $@
+linktest: linktest.o $(UTIL_OBJS)
 
 
-points.o: points.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) points.c
+mandelbrot.o: $(UTIL_HEADERS)
 
-points: points.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) points.o shaderutil.o $(LIBS) -o $@
+mandelbrot: mandelbrot.o $(UTIL_OBJS)
 
 
-pointcoord.o: pointcoord.c readtex.h extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
+multinoise.o: $(UTIL_HEADERS)
 
-pointcoord: pointcoord.o readtex.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
+multinoise: multinoise.o $(UTIL_OBJS)
 
 
-skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
+multitex.o: $(UTIL_HEADERS)
 
-skinning: skinning.o readtex.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
+multitex: multitex.o $(UTIL_OBJS)
 
 
-texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
+noise.o: $(UTIL_HEADERS)
 
-texdemo1: texdemo1.o readtex.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o shaderutil.o $(LIBS) -o $@
+noise: noise.o $(UTIL_OBJS)
 
 
-toyball.o: toyball.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) toyball.c
+noise2.o: $(UTIL_HEADERS)
 
-toyball: toyball.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) toyball.o shaderutil.o $(LIBS) -o $@
+noise2: noise2.o $(UTIL_OBJS)
 
 
-twoside.o: twoside.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) twoside.c
+points.o: $(UTIL_HEADERS)
 
-twoside: twoside.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) twoside.o shaderutil.o $(LIBS) -o $@
+points: points.o $(UTIL_OBJS)
 
 
-trirast.o: trirast.c extfuncs.h shaderutil.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) trirast.c
+pointcoord.o: $(UTIL_HEADERS)
 
-trirast: trirast.o shaderutil.o
-       $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
+pointcoord: pointcoord.o $(UTIL_OBJS)
 
 
+samplers.o: $(UTIL_HEADERS)
 
-clean:
-       -rm -f $(PROGS)
-       -rm -f *.o *~
-       -rm -f extfuncs.h
-       -rm -f shaderutil.*
+samplers: samplers.o $(UTIL_OBJS)
+
+
+samplers_array.o: $(UTIL_HEADERS)
+
+samplers_array: samplers_array.o $(UTIL_OBJS)
+
+
+shadow_sampler.o: $(UTIL_HEADERS)
+
+shadow_sampler: shadow_sampler.o $(UTIL_OBJS)
+
+
+skinning.o: $(UTIL_HEADERS)
+
+skinning: skinning.o $(UTIL_OBJS)
+
+
+texaaline.o: $(UTIL_HEADERS)
+
+texaaline: texaaline.o $(UTIL_OBJS)
+
+
+texdemo1.o: $(UTIL_HEADERS)
+
+texdemo1: texdemo1.o $(UTIL_OBJS)
+
+
+toyball.o: $(UTIL_HEADERS)
+
+toyball: toyball.o $(UTIL_OBJS)
+
+
+twoside.o: $(UTIL_HEADERS)
+
+twoside: twoside.o $(UTIL_OBJS)
+
+
+trirast.o: $(UTIL_HEADERS)
+
+trirast: trirast.o $(UTIL_OBJS)
+
+
+vert-or-frag-only.o: $(UTIL_HEADERS)
+
+vert-or-frag-only: vert-or-frag-only.o $(UTIL_OBJS)
+
+
+vert-tex.o: $(UTIL_HEADERS)
+
+vert-tex: vert-tex.o $(UTIL_OBJS)