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