Nouveau: move the definition of log2i() to header
[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 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 $(APP_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 $(APP_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 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) shaderutil.c
74
75
76
77 bitmap.o: bitmap.c extfuncs.h shaderutil.h
78 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) bitmap.c
79
80 bitmap: bitmap.o shaderutil.o
81 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bitmap.o shaderutil.o $(LIBS) -o $@
82
83
84 brick.o: brick.c extfuncs.h shaderutil.h
85 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) brick.c
86
87 brick: brick.o shaderutil.o
88 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) brick.o shaderutil.o $(LIBS) -o $@
89
90
91 bump.o: bump.c extfuncs.h shaderutil.h
92 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) bump.c
93
94 bump: bump.o shaderutil.o
95 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bump.o shaderutil.o $(LIBS) -o $@
96
97
98 convolutions.o: convolutions.c readtex.h
99 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) convolutions.c
100
101 convolutions: convolutions.o readtex.o
102 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) convolutions.o readtex.o $(LIBS) -o $@
103
104
105 deriv.o: deriv.c extfuncs.h shaderutil.h
106 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) deriv.c
107
108 deriv: deriv.o shaderutil.o
109 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
110
111
112 identity.o: identity.c extfuncs.h shaderutil.h
113 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) identity.c
114
115 identity: identity.o shaderutil.o
116 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) identity.o shaderutil.o $(LIBS) -o $@
117
118
119 fragcoord.o: fragcoord.c extfuncs.h shaderutil.h
120 $(CC) -c -I$(INCDIR) $(CFLAGS) fragcoord.c
121
122 fragcoord: fragcoord.o shaderutil.o
123 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
124
125
126 mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
127 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
128
129 mandelbrot: mandelbrot.o shaderutil.o
130 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) mandelbrot.o shaderutil.o $(LIBS) -o $@
131
132 multitex.o: multitex.c extfuncs.h readtex.h shaderutil.h
133 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) multitex.c
134
135 multitex: multitex.o readtex.o shaderutil.o
136 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) multitex.o readtex.o shaderutil.o $(LIBS) -o $@
137
138
139 noise.o: noise.c extfuncs.h shaderutil.h
140 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) noise.c
141
142 noise: noise.o shaderutil.o
143 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) noise.o shaderutil.o $(LIBS) -o $@
144
145
146 points.o: points.c extfuncs.h shaderutil.h
147 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) points.c
148
149 points: points.o shaderutil.o
150 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) points.o shaderutil.o $(LIBS) -o $@
151
152
153 pointcoord.o: pointcoord.c readtex.h extfuncs.h shaderutil.h
154 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
155
156 pointcoord: pointcoord.o readtex.o shaderutil.o
157 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
158
159
160 skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
161 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
162
163 skinning: skinning.o readtex.o shaderutil.o
164 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
165
166
167 texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
168 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
169
170 texdemo1: texdemo1.o readtex.o shaderutil.o
171 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o shaderutil.o $(LIBS) -o $@
172
173
174 toyball.o: toyball.c extfuncs.h shaderutil.h
175 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) toyball.c
176
177 toyball: toyball.o shaderutil.o
178 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) toyball.o shaderutil.o $(LIBS) -o $@
179
180
181 twoside.o: twoside.c extfuncs.h shaderutil.h
182 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) twoside.c
183
184 twoside: twoside.o shaderutil.o
185 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) twoside.o shaderutil.o $(LIBS) -o $@
186
187
188 trirast.o: trirast.c extfuncs.h shaderutil.h
189 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) trirast.c
190
191 trirast: trirast.o shaderutil.o
192 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
193
194
195 vert-tex.o: vert-tex.c extfuncs.h shaderutil.h
196 $(CC) -c -I$(INCDIR) $(CFLAGS) vert-tex.c
197
198 vert-tex: vert-tex.o shaderutil.o
199 $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-tex.o shaderutil.o $(LIBS) -o $@
200
201
202
203
204 clean:
205 -rm -f $(PROGS)
206 -rm -f *.o *~
207 -rm -f extfuncs.h
208 -rm -f shaderutil.*