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