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