A bunch of tiny tests that I've found helpful bringing up drivers from
[mesa.git] / progs / trivial / 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 = \
14 clear.c \
15 line-clip.c \
16 line-cull.c \
17 line-userclip-clip.c \
18 line-userclip-nop-clip.c \
19 line-userclip-nop.c \
20 line-userclip.c \
21 line.c \
22 lineloop-clip.c \
23 lineloop.c \
24 point.c \
25 point-clip.c \
26 point-param.c \
27 point-wide.c \
28 poly-flat.c \
29 poly-unfilled.c \
30 poly.c \
31 quad-clip.c \
32 quad-clip-all-vertices.c \
33 quad-clip-nearplane.c \
34 quad-degenerate.c \
35 quad-flat.c \
36 quad-offset-factor.c \
37 quad-offset-units.c \
38 quad-offset-unfilled.c \
39 quad-unfilled.c \
40 quad-tex-2d.c \
41 quad-tex-3d.c \
42 quad.c \
43 quads.c \
44 quadstrip.c \
45 quadstrip-flat.c \
46 tri-blend.c \
47 tri-tex-3d.c \
48 tri-clip.c \
49 tri-cull.c \
50 tri-edgeflag.c \
51 tri-flat-clip.c \
52 tri-flat.c \
53 tri-unfilled-clip.c \
54 tri-unfilled-smooth.c \
55 tri-unfilled-userclip.c \
56 tri-unfilled.c \
57 tri-userclip.c \
58 tri-dlist.c \
59 tri.c \
60 tristrip-clip.c \
61 tristrip.c \
62 vp-clip.c \
63 vp-tri.c \
64 vp-line-clip.c \
65 vp-unfilled.c \
66 vp-array.c
67
68 PROGS = $(SOURCES:%.c=%)
69
70 INCLUDES = -I. -I$(TOP)/include -I../samples
71
72 UTIL_FILES = readtex.h readtex.c
73
74
75 ##### RULES #####
76
77 .SUFFIXES:
78 .SUFFIXES: .c
79
80 .c:
81 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
82
83 .c.o:
84 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
85
86 .S.o:
87 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
88
89
90 ##### TARGETS #####
91
92 default: $(UTIL_FILES) $(PROGS)
93
94 clean:
95 rm -f $(PROGS)
96 rm -f *.o
97 rm -f getproclist.h
98
99
100 # auto code generation
101 getprocaddress: getprocaddress.c getproclist.h
102
103 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
104 python getprocaddress.py > getproclist.h
105
106
107 texrect: texrect.o readtex.o
108 $(CC) texrect.o readtex.o $(LIBS) -o $@
109
110 texrect.o: texrect.c readtex.h
111 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
112
113 invert: invert.o readtex.o
114 $(CC) invert.o readtex.o $(LIBS) -o $@
115
116 invert.o: invert.c readtex.h
117 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
118
119 readtex.o: readtex.c
120 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
121
122
123 readtex.h: $(TOP)/progs/util/readtex.h
124 ln -s $(TOP)/progs/util/readtex.h .
125
126 readtex.c: $(TOP)/progs/util/readtex.c
127 ln -s $(TOP)/progs/util/readtex.c .
128
129
130
131
132 # Emacs tags
133 tags:
134 etags `find . -name \*.[ch]` `find ../include`