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