nvc0: Fix building without firmware
[mesa/nouveau-pmpeg.git] / Makefile
blobcf6555c782dc4932342ea2b16de3b65ae5eb80b6
1 # Top-level Mesa makefile
3 TOP = .
5 SUBDIRS = src
8 # The git command below generates an empty string when we're not
9 # building in a GIT tree (i.e., building from a release tarball).
10 default: $(TOP)/configs/current
11 @$(TOP)/bin/extract_git_sha1
12 @for dir in $(SUBDIRS) ; do \
13 if [ -d $$dir ] ; then \
14 (cd $$dir && $(MAKE)) || exit 1 ; \
15 fi \
16 done
18 all: default
21 doxygen:
22 cd doxygen && $(MAKE)
24 check:
25 cd src/glsl/tests/ && ./optimization-test
26 @echo "All tests passed."
28 clean:
29 -@touch $(TOP)/configs/current
30 -@for dir in $(SUBDIRS) ; do \
31 if [ -d $$dir ] ; then \
32 (cd $$dir && $(MAKE) clean) ; \
33 fi \
34 done
35 -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
38 realclean: clean
39 -rm -rf lib*
40 -rm -f $(TOP)/configs/current
41 -rm -f $(TOP)/configs/autoconf
42 -rm -rf autom4te.cache
43 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
44 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
47 distclean: realclean
50 install:
51 @for dir in $(SUBDIRS) ; do \
52 if [ -d $$dir ] ; then \
53 (cd $$dir && $(MAKE) install) || exit 1 ; \
54 fi \
55 done
58 .PHONY: default doxygen clean realclean distclean install check
60 # If there's no current configuration file
61 $(TOP)/configs/current:
62 @echo
63 @echo
64 @echo "Please choose a configuration from the following list:"
65 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
66 @echo
67 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
68 @echo
69 @echo "Or, run './configure' then 'make'"
70 @echo "See './configure --help' for details"
71 @echo
72 @echo "(ignore the following error message)"
73 @exit 1
76 # Rules to set/install a specific build configuration
77 aix \
78 aix-64 \
79 aix-64-static \
80 aix-gcc \
81 aix-static \
82 autoconf \
83 bluegene-osmesa \
84 bluegene-xlc-osmesa \
85 catamount-osmesa-pgi \
86 darwin \
87 darwin-fat-32bit \
88 darwin-fat-all \
89 freebsd \
90 freebsd-dri \
91 freebsd-dri-amd64 \
92 freebsd-dri-x86 \
93 hpux10 \
94 hpux10-gcc \
95 hpux10-static \
96 hpux11-32 \
97 hpux11-32-static \
98 hpux11-32-static-nothreads \
99 hpux11-64 \
100 hpux11-64-static \
101 hpux11-ia64 \
102 hpux11-ia64-static \
103 hpux9 \
104 hpux9-gcc \
105 irix6-64 \
106 irix6-64-static \
107 irix6-n32 \
108 irix6-n32-static \
109 irix6-o32 \
110 irix6-o32-static \
111 linux \
112 linux-i965 \
113 linux-alpha \
114 linux-alpha-static \
115 linux-debug \
116 linux-dri \
117 linux-dri-debug \
118 linux-dri-x86 \
119 linux-dri-x86-64 \
120 linux-dri-ppc \
121 linux-dri-xcb \
122 linux-egl \
123 linux-indirect \
124 linux-fbdev \
125 linux-ia64-icc \
126 linux-ia64-icc-static \
127 linux-icc \
128 linux-icc-static \
129 linux-llvm \
130 linux-llvm-debug \
131 linux-opengl-es \
132 linux-osmesa \
133 linux-osmesa-static \
134 linux-osmesa16 \
135 linux-osmesa16-static \
136 linux-osmesa32 \
137 linux-ppc \
138 linux-ppc-static \
139 linux-profile \
140 linux-sparc \
141 linux-sparc5 \
142 linux-static \
143 linux-ultrasparc \
144 linux-tcc \
145 linux-x86 \
146 linux-x86-debug \
147 linux-x86-32 \
148 linux-x86-64 \
149 linux-x86-64-debug \
150 linux-x86-64-profile \
151 linux-x86-64-static \
152 linux-x86-profile \
153 linux-x86-static \
154 netbsd \
155 openbsd \
156 osf1 \
157 osf1-static \
158 solaris-x86 \
159 solaris-x86-gcc \
160 solaris-x86-gcc-static \
161 sunos4 \
162 sunos4-gcc \
163 sunos4-static \
164 sunos5 \
165 sunos5-gcc \
166 sunos5-64-gcc \
167 sunos5-smp \
168 sunos5-v8 \
169 sunos5-v8-static \
170 sunos5-v9 \
171 sunos5-v9-static \
172 sunos5-v9-cc-g++ \
173 ultrix-gcc:
174 @ if test -f configs/current -o -L configs/current; then \
175 if ! cmp configs/$@ configs/current > /dev/null; then \
176 echo "Please run 'make realclean' before changing configs" ; \
177 exit 1 ; \
178 fi ; \
179 else \
180 cd configs && rm -f current && ln -s $@ current ; \
182 $(MAKE) default
185 # Rules for making release tarballs
187 PACKAGE_VERSION=7.12-devel
188 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
189 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
191 EXTRA_FILES = \
192 aclocal.m4 \
193 configure \
194 src/glsl/glsl_parser.cpp \
195 src/glsl/glsl_parser.h \
196 src/glsl/glsl_lexer.cpp \
197 src/glsl/glcpp/glcpp-lex.c \
198 src/glsl/glcpp/glcpp-parse.c \
199 src/glsl/glcpp/glcpp-parse.h \
200 src/mesa/program/lex.yy.c \
201 src/mesa/program/program_parse.tab.c \
202 src/mesa/program/program_parse.tab.h
204 IGNORE_FILES = \
205 -x autogen.sh
208 parsers: configure
209 -@touch $(TOP)/configs/current
210 $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
211 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
212 $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
214 # Everything for new a Mesa release:
215 ARCHIVES = $(PACKAGE_NAME).tar.gz \
216 $(PACKAGE_NAME).tar.bz2 \
217 $(PACKAGE_NAME).zip \
219 tarballs: md5
220 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
222 # Helper for autoconf builds
223 ACLOCAL = aclocal
224 ACLOCAL_FLAGS =
225 AUTOCONF = autoconf
226 AC_FLAGS =
227 aclocal.m4: configure.ac acinclude.m4
228 $(ACLOCAL) $(ACLOCAL_FLAGS)
229 configure: configure.ac aclocal.m4 acinclude.m4
230 $(AUTOCONF) $(AC_FLAGS)
232 manifest.txt: .git
234 ls -1 $(EXTRA_FILES) ; \
235 git ls-files $(IGNORE_FILES) \
236 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
238 ../$(PACKAGE_DIR):
239 ln -s $(PWD) $@
241 $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
242 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
244 $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
245 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
247 $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
248 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
250 $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
251 rm -f $(PACKAGE_NAME).zip ; \
252 cd .. ; \
253 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
254 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
256 md5: $(ARCHIVES)
257 @-md5sum $(PACKAGE_NAME).tar.gz
258 @-md5sum $(PACKAGE_NAME).tar.bz2
259 @-md5sum $(PACKAGE_NAME).zip
261 .PHONY: tarballs md5