fix-up rules for sphere demo, which uses readtex utility
[profile/ivi/mesa.git] / progs / samples / Makefile
1 # progs/samples/Makefile
2
3 TOP = ../..
4 include $(TOP)/configs/current
5
6 INCDIR = $(TOP)/include
7
8 LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT_LIB_NAME)
9
10 PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
11         font line logo nurb olympic overlay point prim quad select \
12         shape sphere star stencil stretch texture tri wave
13
14
15 ##### RULES #####
16
17 .SUFFIXES:
18 .SUFFIXES: .c
19
20 .c: $(LIB_DEP)
21         $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
22
23
24 ##### TARGETS #####
25
26 default: $(PROGS)
27
28
29 sphere: sphere.o readtex.o
30         $(CC) -I$(INCDIR) $(CFLAGS) sphere.o readtex.o $(APP_LIB_DEPS) -o $@
31
32 sphere.o: sphere.c readtex.h
33         $(CC) -c -I$(INCDIR) $(CFLAGS) sphere.c
34
35 readtex.c: ../util/readtex.c
36         cp ../util/readtex.c .
37
38 readtex.h: ../util/readtex.h
39         cp ../util/readtex.h .
40
41 readtex.o: readtex.c readtex.h
42         $(CC) -c -I$(INCDIR) $(CFLAGS) $< -o $@
43
44
45 clean:
46         -rm -f $(PROGS)
47         -rm -f *.o *~