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