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