assorted fixes
[mesa.git] / progs / tests / Makefile
1 # progs/tests/Makefile
2
3
4 # These programs aren't intended to be included with the normal distro.
5 # They're not too interesting but they're good for testing.
6
7 TOP = ../..
8 include $(TOP)/configs/current
9
10
11 LIBS = $(APP_LIB_DEPS)
12
13 SOURCES = antialias.c \
14 arbfpspec.c \
15 arbfptest1.c \
16 arbfptexture.c \
17 arbfptrig.c \
18 arbvptest1.c \
19 arbvptest3.c \
20 arbvptorus.c \
21 arbvpwarpmesh.c \
22 bufferobj.c \
23 cva.c \
24 dinoshade.c \
25 floattex.c \
26 fogcoord.c \
27 fptest1.c \
28 fptexture.c \
29 getprocaddress.c \
30 manytex.c \
31 multipal.c \
32 pbo.c \
33 projtex.c \
34 seccolor.c \
35 sharedtex.c \
36 stencilwrap.c \
37 tex1d.c \
38 texline.c \
39 texrect.c \
40 texwrap.c \
41 vparray.c \
42 vptest1.c \
43 vptest2.c \
44 vptest3.c \
45 vptorus.c \
46 vpwarpmesh.c \
47 yuvrect.c \
48 yuvsquare.c \
49 zreaddraw.c
50
51 PROGS = $(SOURCES:%.c=%)
52
53 INCLUDES = -I. -I$(TOP)/include
54
55 UTIL_FILES = readtex.h readtex.c
56
57
58 ##### RULES #####
59
60 .SUFFIXES:
61 .SUFFIXES: .c
62
63 .c:
64 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
65
66 .c.o:
67 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
68
69 .S.o:
70 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
71
72
73 ##### TARGETS #####
74
75 default: $(UTIL_FILES) $(PROGS)
76
77 clean:
78 rm -f $(PROGS)
79 rm -f *.o
80 rm -f getproclist.h
81
82
83 # auto code generation
84 getprocaddress: getprocaddress.c getproclist.h
85
86 getproclist.h: $(TOP)/src/mesa/glapi/APIspec getprocaddress.c getprocaddress.py
87 python getprocaddress.py > getproclist.h
88
89
90 texrect: texrect.o readtex.o
91 $(CC) texrect.o readtex.o $(LIBS) -o $@
92
93 texrect.o: texrect.c readtex.h
94 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
95
96 readtex.o: readtex.c
97 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
98
99
100 readtex.h: $(TOP)/progs/util/readtex.h
101 ln -s $(TOP)/progs/util/readtex.h .
102
103 readtex.c: $(TOP)/progs/util/readtex.c
104 ln -s $(TOP)/progs/util/readtex.c .
105
106
107
108
109 # Emacs tags
110 tags:
111 etags `find . -name \*.[ch]` `find ../include`