Merge branch 'nouveau-import'
[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-pbo.c \
42 quad-tex-3d.c \
43 quad-tex-dep.c \
44 quad.c \
45 quads.c \
46 quadstrip.c \
47 quadstrip-flat.c \
48 tri-blend.c \
49 tri-tex-3d.c \
50 tri-clip.c \
51 tri-cull.c \
52 tri-edgeflag.c \
53 tri-flat-clip.c \
54 tri-flat.c \
55 tri-unfilled-clip.c \
56 tri-unfilled-smooth.c \
57 tri-unfilled-userclip.c \
58 tri-unfilled.c \
59 tri-userclip.c \
60 tri-dlist.c \
61 tri.c \
62 tristrip-clip.c \
63 tristrip.c \
64 vp-clip.c \
65 vp-tri.c \
66 vp-line-clip.c \
67 vp-unfilled.c \
68 vp-array.c
69
70 PROGS = $(SOURCES:%.c=%)
71
72 INCLUDES = -I. -I$(TOP)/include -I../samples
73
74 UTIL_FILES = readtex.h readtex.c
75
76
77 ##### RULES #####
78
79 .SUFFIXES:
80 .SUFFIXES: .c
81
82 .c:
83 $(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
84
85 .c.o:
86 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
87
88 .S.o:
89 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
90
91
92 ##### TARGETS #####
93
94 default: $(UTIL_FILES) $(PROGS)
95
96 clean:
97 rm -f $(PROGS)
98 rm -f *.o
99 rm -f getproclist.h
100
101
102 # auto code generation
103 getprocaddress: getprocaddress.c getproclist.h
104
105 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
106 python getprocaddress.py > getproclist.h
107
108
109 texrect: texrect.o readtex.o
110 $(CC) texrect.o readtex.o $(LIBS) -o $@
111
112 texrect.o: texrect.c readtex.h
113 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
114
115 invert: invert.o readtex.o
116 $(CC) invert.o readtex.o $(LIBS) -o $@
117
118 invert.o: invert.c readtex.h
119 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
120
121 readtex.o: readtex.c
122 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
123
124
125 readtex.h: $(TOP)/progs/util/readtex.h
126 ln -s $(TOP)/progs/util/readtex.h .
127
128 readtex.c: $(TOP)/progs/util/readtex.c
129 ln -s $(TOP)/progs/util/readtex.c .
130
131
132
133
134 # Emacs tags
135 tags:
136 etags `find . -name \*.[ch]` `find ../include`