1 # Top-level Mesa makefile
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 ; \
25 -@touch $(TOP)/configs/current
26 -@for dir in $(SUBDIRS) ; do \
27 if [ -d $$dir ] ; then \
28 (cd $$dir && $(MAKE) clean) ; \
31 -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
36 -rm -f $(TOP)/configs/current
37 -rm -f $(TOP)/configs/autoconf
38 -rm -rf autom4te.cache
39 -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
40 -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
47 @for dir in $(SUBDIRS) ; do \
48 if [ -d $$dir ] ; then \
49 (cd $$dir && $(MAKE) install) || exit 1 ; \
54 .PHONY: default doxygen clean realclean distclean install
56 # If there's no current configuration file
57 $(TOP)/configs/current:
60 @echo "Please choose a configuration from the following list:"
61 @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
63 @echo "Then type 'make <config>' (ex: 'make linux-x86')"
65 @echo "Or, run './configure' then 'make'"
66 @echo "See './configure --help' for details"
68 @echo "(ignore the following error message)"
72 # Rules to set/install a specific build configuration
82 catamount-osmesa-pgi \
95 hpux11-32-static-nothreads \
125 linux-ia64-icc-static \
132 linux-osmesa-static \
134 linux-osmesa16-static \
149 linux-x86-64-profile \
150 linux-x86-64-static \
159 solaris-x86-gcc-static \
173 @ if test -f configs/current -o -L configs/current; then \
174 if ! cmp configs/$@ configs/current > /dev/null; then \
175 echo "Please run 'make realclean' before changing configs" ; \
179 cd configs && rm -f current && ln -s $@ current ; \
184 # Rules for making release tarballs
186 PACKAGE_VERSION=7.12-devel
187 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
188 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
193 src/glsl/glsl_parser.cpp \
194 src/glsl/glsl_parser.h \
195 src/glsl/glsl_lexer.cpp \
196 src/glsl/glcpp/glcpp-lex.c \
197 src/glsl/glcpp/glcpp-parse.c \
198 src/glsl/glcpp/glcpp-parse.h \
199 src/mesa/program/lex.yy.c \
200 src/mesa/program/program_parse.tab.c \
201 src/mesa/program/program_parse.tab.h
208 -@touch $(TOP)/configs/current
209 $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
210 $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
211 $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
213 # Everything for new a Mesa release:
214 ARCHIVES = $(PACKAGE_NAME).tar.gz \
215 $(PACKAGE_NAME).tar.bz2 \
216 $(PACKAGE_NAME).zip \
219 rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
221 # Helper for autoconf builds
226 aclocal.m4: configure.ac acinclude.m4
227 $(ACLOCAL) $(ACLOCAL_FLAGS)
228 configure: configure.ac aclocal.m4 acinclude.m4
229 $(AUTOCONF) $(AC_FLAGS)
233 ls -1 $(EXTRA_FILES) ; \
234 git ls-files $(IGNORE_FILES) \
235 ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
240 $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
241 cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
243 $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
244 gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
246 $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
247 bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
249 $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
250 rm -f $(PACKAGE_NAME).zip ; \
252 zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
253 mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
256 @-md5sum $(PACKAGE_NAME).tar.gz
257 @-md5sum $(PACKAGE_NAME).tar.bz2
258 @-md5sum $(PACKAGE_NAME).zip