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