Add "multinoise" demo, to test 1/2/3/4 dimensional noise.
[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 convolutions \
17 deriv \
18 fragcoord \
19 mandelbrot \
20 multinoise \
21 multitex \
22 noise \
23 points \
24 pointcoord \
25 skinning \
26 texdemo1 \
27 toyball \
28 twoside \
29 trirast \
30 vert-tex
31
32
33 ##### RULES #####
34
35 .SUFFIXES:
36 .SUFFIXES: .c
37
38
39 # make executable from .c file:
40 .c: $(LIB_DEP)
41 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
42
43
44 ##### TARGETS #####
45
46 default: $(PROGS)
47
48
49
50 ##### Extra dependencies
51
52 extfuncs.h: $(TOP)/progs/util/extfuncs.h
53 cp $< .
54
55
56 readtex.c: $(TOP)/progs/util/readtex.c
57 cp $< .
58
59 readtex.h: $(TOP)/progs/util/readtex.h
60 cp $< .
61
62 readtex.o: readtex.c readtex.h
63 $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
64
65
66 shaderutil.c: $(TOP)/progs/util/shaderutil.c
67 cp $< .
68
69 shaderutil.h: $(TOP)/progs/util/shaderutil.h
70 cp $< .
71
72 shaderutil.o: shaderutil.c shaderutil.h
73 $(CC) -c -I$(INCDIR) $(CFLAGS) shaderutil.c
74
75
76
77 bitmap.o: bitmap.c extfuncs.h shaderutil.h
78 $(CC) -c -I$(INCDIR) $(CFLAGS) bitmap.c
79
80 bitmap: bitmap.o shaderutil.o
81 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bitmap.o shaderutil.o $(LIBS) -o $@
82
83
84 brick.o: brick.c extfuncs.h shaderutil.h
85 $(CC) -c -I$(INCDIR) $(CFLAGS) brick.c
86
87 brick: brick.o shaderutil.o
88 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) brick.o shaderutil.o $(LIBS) -o $@
89
90
91 bump.o: bump.c extfuncs.h shaderutil.h
92 $(CC) -c -I$(INCDIR) $(CFLAGS) bump.c
93
94 bump: bump.o shaderutil.o
95 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bump.o shaderutil.o $(LIBS) -o $@
96
97
98 convolutions.o: convolutions.c readtex.h
99 $(CC) -c -I$(INCDIR) $(CFLAGS) convolutions.c
100
101 convolutions: convolutions.o readtex.o
102 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) convolutions.o readtex.o $(LIBS) -o $@
103
104
105 deriv.o: deriv.c extfuncs.h shaderutil.h
106 $(CC) -c -I$(INCDIR) $(CFLAGS) deriv.c
107
108 deriv: deriv.o shaderutil.o
109 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
110
111
112 fragcoord.o: fragcoord.c extfuncs.h shaderutil.h
113 $(CC) -c -I$(INCDIR) $(CFLAGS) fragcoord.c
114
115 fragcoord: fragcoord.o shaderutil.o
116 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
117
118
119 mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
120 $(CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
121
122 mandelbrot: mandelbrot.o shaderutil.o
123 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) mandelbrot.o shaderutil.o $(LIBS) -o $@
124
125
126 multitex.o: multitex.c extfuncs.h readtex.h shaderutil.h
127 $(CC) -c -I$(INCDIR) $(CFLAGS) multitex.c
128
129 multitex: multitex.o readtex.o shaderutil.o
130 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) multitex.o readtex.o shaderutil.o $(LIBS) -o $@
131
132
133 noise.o: noise.c extfuncs.h shaderutil.h
134 $(CC) -c -I$(INCDIR) $(CFLAGS) noise.c
135
136 noise: noise.o shaderutil.o
137 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) noise.o shaderutil.o $(LIBS) -o $@
138
139
140 points.o: points.c extfuncs.h shaderutil.h
141 $(CC) -c -I$(INCDIR) $(CFLAGS) points.c
142
143 points: points.o shaderutil.o
144 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) points.o shaderutil.o $(LIBS) -o $@
145
146
147 pointcoord.o: pointcoord.c readtex.h extfuncs.h shaderutil.h
148 $(CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
149
150 pointcoord: pointcoord.o readtex.o shaderutil.o
151 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
152
153
154 skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
155 $(CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
156
157 skinning: skinning.o readtex.o shaderutil.o
158 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
159
160
161 texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
162 $(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
163
164 texdemo1: texdemo1.o readtex.o shaderutil.o
165 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o shaderutil.o $(LIBS) -o $@
166
167
168 toyball.o: toyball.c extfuncs.h shaderutil.h
169 $(CC) -c -I$(INCDIR) $(CFLAGS) toyball.c
170
171 toyball: toyball.o shaderutil.o
172 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) toyball.o shaderutil.o $(LIBS) -o $@
173
174
175 twoside.o: twoside.c extfuncs.h shaderutil.h
176 $(CC) -c -I$(INCDIR) $(CFLAGS) twoside.c
177
178 twoside: twoside.o shaderutil.o
179 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) twoside.o shaderutil.o $(LIBS) -o $@
180
181
182 trirast.o: trirast.c extfuncs.h shaderutil.h
183 $(CC) -c -I$(INCDIR) $(CFLAGS) trirast.c
184
185 trirast: trirast.o shaderutil.o
186 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
187
188
189 vert-tex.o: vert-tex.c extfuncs.h shaderutil.h
190 $(CC) -c -I$(INCDIR) $(CFLAGS) vert-tex.c
191
192 vert-tex: vert-tex.o shaderutil.o
193 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-tex.o shaderutil.o $(LIBS) -o $@
194
195
196
197
198 clean:
199 -rm -f $(PROGS)
200 -rm -f *.o *~
201 -rm -f extfuncs.h
202 -rm -f shaderutil.*