2007-01-15 17:27:24 -07:00
|
|
|
# progs/demos/Makefile
|
|
|
|
|
|
|
|
|
|
TOP = ../..
|
|
|
|
|
include $(TOP)/configs/current
|
|
|
|
|
|
|
|
|
|
INCDIR = $(TOP)/include
|
|
|
|
|
|
2009-04-18 14:18:59 -06:00
|
|
|
LIB_DEP = \
|
|
|
|
|
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) \
|
|
|
|
|
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
|
|
|
|
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
2007-01-15 17:27:24 -07:00
|
|
|
|
2009-09-16 15:49:33 -06:00
|
|
|
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) \
|
|
|
|
|
-l$(GL_LIB) $(APP_LIB_DEPS)
|
2009-04-18 14:18:59 -06:00
|
|
|
|
2009-08-14 10:03:51 +10:00
|
|
|
# using : to avoid APP_CC pointing to CC loop
|
2009-09-16 15:49:33 -06:00
|
|
|
CC := $(APP_CC)
|
2009-09-21 08:44:53 -06:00
|
|
|
CFLAGS := -I$(INCDIR) $(CFLAGS)
|
2009-09-16 15:49:33 -06:00
|
|
|
LDLIBS = $(LIBS)
|
2009-08-14 10:03:51 +10:00
|
|
|
|
2009-09-16 15:49:33 -06:00
|
|
|
PROG_SOURCES = \
|
2009-04-18 14:18:59 -06:00
|
|
|
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 \
|
2009-08-26 11:55:15 -06:00
|
|
|
samplers_array.c \
|
2009-04-18 14:18:59 -06:00
|
|
|
shadow_sampler.c \
|
2009-08-13 12:52:13 -06:00
|
|
|
shtest.c \
|
2009-04-18 14:18:59 -06:00
|
|
|
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)
|
2009-09-16 15:49:33 -06:00
|
|
|
PROG_OBJS = $(PROG_SOURCES:.c=.o)
|
|
|
|
|
PROGS = $(PROG_SOURCES:%.c=%)
|
2009-04-18 14:18:59 -06:00
|
|
|
|
2007-01-15 17:27:24 -07:00
|
|
|
##### TARGETS #####
|
|
|
|
|
|
|
|
|
|
default: $(PROGS)
|
|
|
|
|
|
2009-08-14 10:03:51 +10:00
|
|
|
$(PROG_OBJS): $(UTIL_HEADERS)
|
|
|
|
|
|
|
|
|
|
$(PROGS): $(UTIL_OBJS)
|
2007-01-16 14:55:43 -07:00
|
|
|
|
2009-04-18 14:18:59 -06:00
|
|
|
clean:
|
|
|
|
|
-rm -f $(PROGS)
|
|
|
|
|
-rm -f *.o *~
|
|
|
|
|
-rm -f extfuncs.h
|
|
|
|
|
-rm -f shaderutil.*
|
2009-06-01 11:23:39 -06:00
|
|
|
-rm -f readtex.*
|
2009-04-18 14:18:59 -06:00
|
|
|
|
|
|
|
|
|
2007-01-16 14:55:43 -07:00
|
|
|
##### Extra dependencies
|
2007-01-15 17:27:24 -07:00
|
|
|
|
2009-08-26 12:01:23 -06:00
|
|
|
samplers_array.o: samplers.c
|
|
|
|
|
$(APP_CC) $(CFLAGS) -DSAMPLERS_ARRAY $< -c -o $@
|
|
|
|
|
|
2009-06-01 11:23:39 -06:00
|
|
|
extfuncs.h: $(TOP)/progs/util/extfuncs.h
|
|
|
|
|
cp $< .
|
2007-01-15 17:27:24 -07:00
|
|
|
|
2009-06-01 11:23:39 -06:00
|
|
|
readtex.c: $(TOP)/progs/util/readtex.c
|
|
|
|
|
cp $< .
|
2008-04-09 22:28:23 -06:00
|
|
|
|
2009-06-01 11:23:39 -06:00
|
|
|
readtex.h: $(TOP)/progs/util/readtex.h
|
|
|
|
|
cp $< .
|
2007-02-03 11:33:13 -07:00
|
|
|
|
2009-06-01 11:23:39 -06:00
|
|
|
shaderutil.c: $(TOP)/progs/util/shaderutil.c
|
|
|
|
|
cp $< .
|
2007-02-03 11:33:13 -07:00
|
|
|
|
2009-06-01 11:23:39 -06:00
|
|
|
shaderutil.h: $(TOP)/progs/util/shaderutil.h
|
|
|
|
|
cp $< .
|
2007-01-15 17:27:24 -07:00
|
|
|
|