Merge branch 'master' into autoconf2
[mesa.git] / progs / glsl / Makefile
1 # progs/demos/Makefile
2
3 TOP = ../..
4 include $(TOP)/configs/current
5
6 INCDIR = $(TOP)/include
7
8 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
9
10 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
11
12 PROGS = \
13 bitmap \
14 brick \
15 bump \
16 deriv \
17 mandelbrot \
18 noise \
19 points \
20 texdemo1 \
21 toyball \
22 twoside \
23 trirast
24
25
26 ##### RULES #####
27
28 .SUFFIXES:
29 .SUFFIXES: .c
30
31
32 # make executable from .c file:
33 .c: $(LIB_DEP)
34 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
35
36
37 ##### TARGETS #####
38
39 default: $(PROGS)
40
41
42
43 ##### Extra dependencies
44
45 extfuncs.h: $(TOP)/progs/util/extfuncs.h
46 cp $< .
47
48 readtex.c: $(TOP)/progs/util/readtex.c
49 cp $< .
50
51 readtex.h: $(TOP)/progs/util/readtex.h
52 cp $< .
53
54 readtex.o: readtex.c readtex.h
55 $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
56
57 bitmap.c: extfuncs.h
58
59 brick.c: extfuncs.h
60
61 bump.c: extfuncs.h
62
63 mandelbrot.c: extfuncs.h
64
65 points.c: extfuncs.h
66
67 toyball.c: extfuncs.h
68
69 texdemo1: texdemo1.o readtex.o
70 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o $(LIBS) -o $@
71
72 texdemo1.o: texdemo1.c readtex.h extfuncs.h
73 $(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
74
75
76 clean:
77 -rm -f $(PROGS)
78 -rm -f *.o *~
79 -rm -f extfuncs.h