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