7bfcefd02d1cd0eb8e5d5bf454d3a281a8ff91a8
[mesa.git] / progs / demos / Makefile
1 # progs/demos/Makefile
2
3 TOP = ../..
4 include $(TOP)/configs/current
5
6 INCDIR = $(TOP)/include
7
8 OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
9
10 OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
11
12 OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
13
14 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
15
16 PROGS = \
17 arbfplight \
18 arbfslight \
19 arbocclude \
20 bounce \
21 clearspd \
22 copypix \
23 cubemap \
24 drawpix \
25 engine \
26 fire \
27 fogcoord \
28 fplight \
29 fslight \
30 gamma \
31 gearbox \
32 gears \
33 geartrain \
34 glinfo \
35 gloss \
36 glslnoise \
37 gltestperf \
38 glutfx \
39 isosurf \
40 ipers \
41 lodbias \
42 morph3d \
43 multiarb \
44 paltex \
45 pointblast \
46 ray \
47 readpix \
48 reflect \
49 renormal \
50 shadowtex \
51 singlebuffer \
52 streaming_rect \
53 spectex \
54 spriteblast \
55 stex3d \
56 teapot \
57 terrain \
58 tessdemo \
59 texcyl \
60 texdown \
61 texenv \
62 texobj \
63 trispd \
64 tunnel \
65 tunnel2 \
66 vao_demo \
67 winpos
68
69
70 ##### RULES #####
71
72 .SUFFIXES:
73 .SUFFIXES: .c
74
75
76 # make executable from .c file:
77 .c: $(LIB_DEP) readtex.o
78 $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
79
80
81 ##### TARGETS #####
82
83 default: $(PROGS)
84
85 $(PROGS): readtex.o
86
87 readtex.c: $(TOP)/progs/util/readtex.c
88 cp $< .
89
90 readtex.h: $(TOP)/progs/util/readtex.h
91 cp $< .
92
93 readtex.o: readtex.c readtex.h
94 $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
95
96
97 showbuffer.c: $(TOP)/progs/util/showbuffer.c
98 cp $< .
99
100 showbuffer.h: $(TOP)/progs/util/showbuffer.h
101 cp $< .
102
103 showbuffer.o: showbuffer.c showbuffer.h
104 $(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
105
106
107 trackball.c: $(TOP)/progs/util/trackball.c
108 cp $< .
109
110 trackball.h: $(TOP)/progs/util/trackball.h
111 cp $< .
112
113 trackball.o: trackball.c trackball.h
114 $(CC) -c -I$(INCDIR) $(CFLAGS) trackball.c
115
116
117 extfuncs.h: $(TOP)/progs/util/extfuncs.h
118 cp $< .
119
120
121 reflect: reflect.o showbuffer.o readtex.o
122 $(CC) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
123
124 reflect.o: reflect.c showbuffer.h
125 $(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
126
127
128 shadowtex: shadowtex.o showbuffer.o
129 $(CC) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
130
131 shadowtex.o: shadowtex.c showbuffer.h
132 $(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
133
134
135 gloss: gloss.o trackball.o readtex.o
136 $(CC) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
137
138 gloss.o: gloss.c trackball.h
139 $(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
140
141
142 engine: engine.o trackball.o readtex.o
143 $(CC) engine.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
144
145 engine.o: engine.c trackball.h
146 $(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
147
148
149 fslight: fslight.o
150 $(CC) fslight.o $(APP_LIB_DEPS) -o $@
151
152 fslight.o: fslight.c extfuncs.h
153 $(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
154
155
156
157 viewdds: viewdds.c
158 $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -L. -lgltc -o $@
159
160
161 clean:
162 -rm -f $(PROGS)
163 -rm -f *.o *~
164 -rm -f readtex.[ch] showbuffer.[ch]