43874ecdaa0f858b8cc3cec97d1a97d107c32c38
[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 cubemap \
23 drawpix \
24 engine \
25 fire \
26 fogcoord \
27 fplight \
28 fslight \
29 gamma \
30 gearbox \
31 gears \
32 geartrain \
33 glinfo \
34 gloss \
35 glslnoise \
36 gltestperf \
37 glutfx \
38 isosurf \
39 ipers \
40 lodbias \
41 morph3d \
42 multiarb \
43 paltex \
44 pointblast \
45 ray \
46 readpix \
47 reflect \
48 renormal \
49 shadowtex \
50 singlebuffer \
51 streaming_rect \
52 spectex \
53 spriteblast \
54 stex3d \
55 teapot \
56 terrain \
57 tessdemo \
58 texcyl \
59 texdown \
60 texenv \
61 texobj \
62 trispd \
63 tunnel \
64 tunnel2 \
65 vao_demo \
66 winpos
67
68
69 ##### RULES #####
70
71 .SUFFIXES:
72 .SUFFIXES: .c
73
74
75 # make executable from .c file:
76 .c: $(LIB_DEP) readtex.o
77 $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
78
79
80 ##### TARGETS #####
81
82 default: $(PROGS)
83
84 $(PROGS): readtex.o
85
86 readtex.c: $(TOP)/progs/util/readtex.c
87 cp $< .
88
89 readtex.h: $(TOP)/progs/util/readtex.h
90 cp $< .
91
92 readtex.o: readtex.c readtex.h
93 $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
94
95
96 showbuffer.c: $(TOP)/progs/util/showbuffer.c
97 cp $< .
98
99 showbuffer.h: $(TOP)/progs/util/showbuffer.h
100 cp $< .
101
102 showbuffer.o: showbuffer.c showbuffer.h
103 $(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
104
105
106 trackball.c: $(TOP)/progs/util/trackball.c
107 cp $< .
108
109 trackball.h: $(TOP)/progs/util/trackball.h
110 cp $< .
111
112 trackball.o: trackball.c trackball.h
113 $(CC) -c -I$(INCDIR) $(CFLAGS) trackball.c
114
115
116 extfuncs.h: $(TOP)/progs/util/extfuncs.h
117 cp $< .
118
119
120 reflect: reflect.o showbuffer.o readtex.o
121 $(CC) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) $(ARCH_FLAGS) -o $@
122
123 reflect.o: reflect.c showbuffer.h
124 $(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
125
126
127 shadowtex: shadowtex.o showbuffer.o
128 $(CC) shadowtex.o showbuffer.o $(APP_LIB_DEPS) $(ARCH_FLAGS) -o $@
129
130 shadowtex.o: shadowtex.c showbuffer.h
131 $(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
132
133
134 gloss: gloss.o trackball.o readtex.o
135 $(CC) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) $(ARCH_FLAGS) -o $@
136
137 gloss.o: gloss.c trackball.h
138 $(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
139
140
141 engine: engine.o trackball.o readtex.o
142 $(CC) engine.o trackball.o readtex.o $(APP_LIB_DEPS) $(ARCH_FLAGS) -o $@
143
144 engine.o: engine.c trackball.h
145 $(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
146
147
148 fslight: fslight.o
149 $(CC) fslight.o $(APP_LIB_DEPS) $(ARCH_FLAGS) -o $@
150
151 fslight.o: fslight.c extfuncs.h
152 $(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
153
154
155
156 clean:
157 -rm -f $(PROGS)
158 -rm -f *.o *~
159 -rm -f readtex.[ch] showbuffer.[ch]