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