OSDN Git Service

Merge branch 'gallium-i915-current' into gallium-0.1
[android-x86/external-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 PROGS = \
11         brick \
12         bump \
13         deriv \
14         mandelbrot \
15         noise \
16         toyball \
17         texdemo1 \
18         convolutions
19
20
21 ##### RULES #####
22
23 .SUFFIXES:
24 .SUFFIXES: .c
25
26
27 # make executable from .c file:
28 .c: $(LIB_DEP)
29         $(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
30
31
32 ##### TARGETS #####
33
34 default: $(PROGS)
35
36
37
38 ##### Extra dependencies
39
40 extfuncs.h:  $(TOP)/progs/util/extfuncs.h
41         cp $< .
42
43 readtex.c: $(TOP)/progs/util/readtex.c
44         cp $< .
45
46 readtex.h: $(TOP)/progs/util/readtex.h
47         cp $< .
48
49 readtex.o: readtex.c readtex.h
50         $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
51
52 brick.c: extfuncs.h
53
54 bump.c: extfuncs.h
55
56 mandelbrot.c: extfuncs.h
57
58 toyball.c: extfuncs.h
59
60 texdemo1: texdemo1.o readtex.o
61         $(CC) -I$(INCDIR) $(CFLAGS) texdemo1.o readtex.o $(APP_LIB_DEPS) -o $@
62
63 texdemo1.o: texdemo1.c readtex.h extfuncs.h
64         $(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
65
66 convolutions: convolutions.o readtex.o
67         $(CC) -I$(INCDIR) $(CFLAGS) convolutions.o readtex.o $(APP_LIB_DEPS) -o $@
68
69 convolutions.o: convolutions.c readtex.h
70         $(CC) -c -I$(INCDIR) $(CFLAGS) convolutions.c
71
72
73 clean:
74         -rm -f $(PROGS)
75         -rm -f *.o *~
76         -rm -f extfuncs.h