2004-03-26 15:19:11 +00:00
|
|
|
# Top-level Mesa makefile
|
|
|
|
|
|
|
|
TOP = .
|
|
|
|
|
2010-06-05 00:36:17 +01:00
|
|
|
SUBDIRS = src
|
2004-03-26 15:19:11 +00:00
|
|
|
|
|
|
|
|
2011-03-31 19:42:01 +01:00
|
|
|
# The git command below generates an empty string when we're not
|
|
|
|
# building in a GIT tree (i.e., building from a release tarball).
|
2004-03-26 15:19:11 +00:00
|
|
|
default: $(TOP)/configs/current
|
2011-03-31 19:42:01 +01:00
|
|
|
@$(TOP)/bin/extract_git_sha1
|
2004-03-26 15:19:11 +00:00
|
|
|
@for dir in $(SUBDIRS) ; do \
|
2007-05-09 23:22:53 +01:00
|
|
|
if [ -d $$dir ] ; then \
|
|
|
|
(cd $$dir && $(MAKE)) || exit 1 ; \
|
|
|
|
fi \
|
2004-03-26 15:19:11 +00:00
|
|
|
done
|
|
|
|
|
2008-02-18 07:47:35 +00:00
|
|
|
all: default
|
|
|
|
|
2004-03-26 15:19:11 +00:00
|
|
|
|
2004-07-01 16:32:51 +01:00
|
|
|
doxygen:
|
2008-05-06 20:29:53 +01:00
|
|
|
cd doxygen && $(MAKE)
|
2004-07-01 16:32:51 +01:00
|
|
|
|
2011-07-05 19:52:06 +01:00
|
|
|
check:
|
|
|
|
cd src/glsl/tests/ && ./optimization-test
|
|
|
|
@echo "All tests passed."
|
|
|
|
|
2004-03-26 15:19:11 +00:00
|
|
|
clean:
|
2008-05-07 19:35:23 +01:00
|
|
|
-@touch $(TOP)/configs/current
|
|
|
|
-@for dir in $(SUBDIRS) ; do \
|
2007-05-09 23:22:53 +01:00
|
|
|
if [ -d $$dir ] ; then \
|
|
|
|
(cd $$dir && $(MAKE) clean) ; \
|
|
|
|
fi \
|
2004-03-26 15:19:11 +00:00
|
|
|
done
|
2008-05-07 19:35:23 +01:00
|
|
|
-@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
|
2004-03-26 15:19:11 +00:00
|
|
|
|
|
|
|
|
2008-05-07 19:35:23 +01:00
|
|
|
realclean: clean
|
2004-03-26 15:19:11 +00:00
|
|
|
-rm -rf lib*
|
|
|
|
-rm -f $(TOP)/configs/current
|
2007-10-23 17:25:58 +01:00
|
|
|
-rm -f $(TOP)/configs/autoconf
|
|
|
|
-rm -rf autom4te.cache
|
2008-05-06 22:00:43 +01:00
|
|
|
-find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
|
|
|
|
-name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
|
2004-12-15 11:03:41 +00:00
|
|
|
|
2004-03-26 15:19:11 +00:00
|
|
|
|
2009-04-16 16:31:45 +01:00
|
|
|
distclean: realclean
|
|
|
|
|
|
|
|
|
2004-03-26 15:19:11 +00:00
|
|
|
install:
|
2006-06-22 23:50:48 +01:00
|
|
|
@for dir in $(SUBDIRS) ; do \
|
2007-05-09 23:22:53 +01:00
|
|
|
if [ -d $$dir ] ; then \
|
|
|
|
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
|
|
|
fi \
|
2006-06-22 23:50:48 +01:00
|
|
|
done
|
2005-01-03 15:35:00 +00:00
|
|
|
|
2007-05-09 23:22:53 +01:00
|
|
|
|
2011-07-05 19:52:06 +01:00
|
|
|
.PHONY: default doxygen clean realclean distclean install check
|
2008-05-06 19:52:34 +01:00
|
|
|
|
2004-03-26 15:19:11 +00:00
|
|
|
# If there's no current configuration file
|
|
|
|
$(TOP)/configs/current:
|
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
@echo "Please choose a configuration from the following list:"
|
2008-05-06 23:46:40 +01:00
|
|
|
@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
|
2004-03-26 15:19:11 +00:00
|
|
|
@echo
|
|
|
|
@echo "Then type 'make <config>' (ex: 'make linux-x86')"
|
2008-05-06 23:46:40 +01:00
|
|
|
@echo
|
|
|
|
@echo "Or, run './configure' then 'make'"
|
|
|
|
@echo "See './configure --help' for details"
|
|
|
|
@echo
|
2004-03-26 15:19:11 +00:00
|
|
|
@echo "(ignore the following error message)"
|
|
|
|
@exit 1
|
|
|
|
|
|
|
|
|
|
|
|
# Rules to set/install a specific build configuration
|
|
|
|
aix \
|
2004-10-01 14:33:26 +01:00
|
|
|
aix-64 \
|
2006-04-13 04:00:14 +01:00
|
|
|
aix-64-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
aix-gcc \
|
2004-07-01 16:32:51 +01:00
|
|
|
aix-static \
|
2007-10-23 17:25:58 +01:00
|
|
|
autoconf \
|
2007-08-03 03:26:49 +01:00
|
|
|
bluegene-osmesa \
|
2007-09-20 22:11:14 +01:00
|
|
|
bluegene-xlc-osmesa \
|
2004-08-14 11:10:42 +01:00
|
|
|
beos \
|
2007-10-24 23:31:22 +01:00
|
|
|
catamount-osmesa-pgi \
|
2004-03-26 15:19:11 +00:00
|
|
|
darwin \
|
2008-03-10 22:13:28 +00:00
|
|
|
darwin-fat-32bit \
|
|
|
|
darwin-fat-all \
|
2004-03-26 15:19:11 +00:00
|
|
|
freebsd \
|
2004-10-28 01:19:21 +01:00
|
|
|
freebsd-dri \
|
2005-05-28 21:17:06 +01:00
|
|
|
freebsd-dri-amd64 \
|
2004-10-28 01:19:21 +01:00
|
|
|
freebsd-dri-x86 \
|
2004-03-26 15:19:11 +00:00
|
|
|
hpux10 \
|
|
|
|
hpux10-gcc \
|
2004-03-30 15:56:47 +01:00
|
|
|
hpux10-static \
|
2004-10-01 21:19:16 +01:00
|
|
|
hpux11-32 \
|
2004-03-26 15:19:11 +00:00
|
|
|
hpux11-32-static \
|
|
|
|
hpux11-32-static-nothreads \
|
2004-10-01 21:19:16 +01:00
|
|
|
hpux11-64 \
|
2004-03-26 15:19:11 +00:00
|
|
|
hpux11-64-static \
|
2006-04-13 04:00:14 +01:00
|
|
|
hpux11-ia64 \
|
|
|
|
hpux11-ia64-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
hpux9 \
|
|
|
|
hpux9-gcc \
|
|
|
|
irix6-64 \
|
|
|
|
irix6-64-static \
|
|
|
|
irix6-n32 \
|
|
|
|
irix6-n32-static \
|
|
|
|
irix6-o32 \
|
|
|
|
irix6-o32-static \
|
|
|
|
linux \
|
2009-11-04 13:03:35 +00:00
|
|
|
linux-i965 \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-alpha \
|
|
|
|
linux-alpha-static \
|
2007-12-02 22:23:51 +00:00
|
|
|
linux-cell \
|
2008-09-03 16:08:19 +01:00
|
|
|
linux-cell-debug \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-debug \
|
2004-04-14 13:44:07 +01:00
|
|
|
linux-dri \
|
2007-02-23 18:58:46 +00:00
|
|
|
linux-dri-debug \
|
2004-05-03 12:30:37 +01:00
|
|
|
linux-dri-x86 \
|
2004-04-30 09:29:04 +01:00
|
|
|
linux-dri-x86-64 \
|
2004-10-13 20:56:15 +01:00
|
|
|
linux-dri-ppc \
|
2006-02-19 22:30:46 +00:00
|
|
|
linux-dri-xcb \
|
2008-05-22 15:24:51 +01:00
|
|
|
linux-egl \
|
2005-07-29 18:25:50 +01:00
|
|
|
linux-indirect \
|
2005-04-29 18:31:10 +01:00
|
|
|
linux-fbdev \
|
2006-04-13 04:00:14 +01:00
|
|
|
linux-ia64-icc \
|
|
|
|
linux-ia64-icc-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-icc \
|
|
|
|
linux-icc-static \
|
2007-10-22 16:00:28 +01:00
|
|
|
linux-llvm \
|
2009-12-18 18:17:06 +00:00
|
|
|
linux-llvm-debug \
|
2009-11-06 08:27:19 +00:00
|
|
|
linux-opengl-es \
|
2006-07-04 17:49:58 +01:00
|
|
|
linux-osmesa \
|
2009-05-18 15:46:17 +01:00
|
|
|
linux-osmesa-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-osmesa16 \
|
|
|
|
linux-osmesa16-static \
|
|
|
|
linux-osmesa32 \
|
|
|
|
linux-ppc \
|
|
|
|
linux-ppc-static \
|
2007-09-19 23:43:36 +01:00
|
|
|
linux-profile \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-sparc \
|
|
|
|
linux-sparc5 \
|
|
|
|
linux-static \
|
|
|
|
linux-ultrasparc \
|
2004-04-14 22:19:34 +01:00
|
|
|
linux-tcc \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-x86 \
|
2004-04-14 13:44:07 +01:00
|
|
|
linux-x86-debug \
|
2005-03-03 01:44:42 +00:00
|
|
|
linux-x86-32 \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-x86-64 \
|
2005-05-07 17:59:58 +01:00
|
|
|
linux-x86-64-debug \
|
2007-09-28 18:17:11 +01:00
|
|
|
linux-x86-64-profile \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-x86-64-static \
|
2007-09-28 18:17:11 +01:00
|
|
|
linux-x86-profile \
|
2004-03-26 15:19:11 +00:00
|
|
|
linux-x86-static \
|
|
|
|
netbsd \
|
|
|
|
openbsd \
|
|
|
|
osf1 \
|
2006-04-13 04:00:14 +01:00
|
|
|
osf1-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
solaris-x86 \
|
|
|
|
solaris-x86-gcc \
|
2006-05-17 23:51:44 +01:00
|
|
|
solaris-x86-gcc-static \
|
2004-03-26 15:19:11 +00:00
|
|
|
sunos4 \
|
|
|
|
sunos4-gcc \
|
|
|
|
sunos4-static \
|
|
|
|
sunos5 \
|
|
|
|
sunos5-gcc \
|
2006-04-07 16:16:46 +01:00
|
|
|
sunos5-64-gcc \
|
2004-03-26 15:19:11 +00:00
|
|
|
sunos5-smp \
|
2006-04-13 04:00:14 +01:00
|
|
|
sunos5-v8 \
|
|
|
|
sunos5-v8-static \
|
|
|
|
sunos5-v9 \
|
|
|
|
sunos5-v9-static \
|
2007-07-31 16:32:10 +01:00
|
|
|
sunos5-v9-cc-g++ \
|
2004-03-26 15:19:11 +00:00
|
|
|
ultrix-gcc:
|
2010-02-14 13:15:49 +00:00
|
|
|
@ if test -f configs/current -o -L configs/current; then \
|
|
|
|
if ! cmp configs/$@ configs/current > /dev/null; then \
|
|
|
|
echo "Please run 'make realclean' before changing configs" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi ; \
|
|
|
|
else \
|
|
|
|
cd configs && rm -f current && ln -s $@ current ; \
|
2006-08-03 17:58:06 +01:00
|
|
|
fi
|
2004-06-01 01:06:14 +01:00
|
|
|
$(MAKE) default
|
2004-03-26 15:19:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Rules for making release tarballs
|
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
PACKAGE_VERSION=7.12-devel
|
|
|
|
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
|
|
|
|
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
|
|
|
|
|
|
|
EXTRA_FILES = \
|
|
|
|
aclocal.m4 \
|
|
|
|
configure \
|
|
|
|
src/glsl/glsl_parser.cpp \
|
|
|
|
src/glsl/glsl_parser.h \
|
|
|
|
src/glsl/glsl_lexer.cpp \
|
|
|
|
src/glsl/glcpp/glcpp-lex.c \
|
|
|
|
src/glsl/glcpp/glcpp-parse.c \
|
|
|
|
src/glsl/glcpp/glcpp-parse.h \
|
|
|
|
src/mesa/program/lex.yy.c \
|
|
|
|
src/mesa/program/program_parse.tab.c \
|
|
|
|
src/mesa/program/program_parse.tab.h
|
|
|
|
|
|
|
|
IGNORE_FILES = \
|
|
|
|
-x autogen.sh
|
2005-07-22 16:52:46 +01:00
|
|
|
|
2005-07-21 19:44:52 +01:00
|
|
|
|
2011-02-12 00:44:11 +00:00
|
|
|
parsers: configure
|
|
|
|
-@touch $(TOP)/configs/current
|
|
|
|
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
|
|
|
|
$(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
|
2011-07-14 17:33:30 +01:00
|
|
|
$(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
|
2011-02-12 00:44:11 +00:00
|
|
|
|
2004-09-09 19:17:36 +01:00
|
|
|
# Everything for new a Mesa release:
|
2011-07-14 17:28:52 +01:00
|
|
|
ARCHIVES = $(PACKAGE_NAME).tar.gz \
|
|
|
|
$(PACKAGE_NAME).tar.bz2 \
|
|
|
|
$(PACKAGE_NAME).zip \
|
2005-07-22 16:52:46 +01:00
|
|
|
|
2011-02-12 00:44:11 +00:00
|
|
|
tarballs: md5
|
2011-07-14 17:28:52 +01:00
|
|
|
rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
|
2004-09-09 19:17:36 +01:00
|
|
|
|
2007-12-06 01:23:00 +00:00
|
|
|
# Helper for autoconf builds
|
|
|
|
ACLOCAL = aclocal
|
|
|
|
ACLOCAL_FLAGS =
|
|
|
|
AUTOCONF = autoconf
|
|
|
|
AC_FLAGS =
|
2008-05-06 02:24:21 +01:00
|
|
|
aclocal.m4: configure.ac acinclude.m4
|
2007-12-06 01:23:00 +00:00
|
|
|
$(ACLOCAL) $(ACLOCAL_FLAGS)
|
2011-07-20 04:11:53 +01:00
|
|
|
configure: configure.ac aclocal.m4 acinclude.m4
|
2007-12-06 01:23:00 +00:00
|
|
|
$(AUTOCONF) $(AC_FLAGS)
|
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
manifest.txt: .git
|
|
|
|
( \
|
|
|
|
ls -1 $(EXTRA_FILES) ; \
|
|
|
|
git ls-files $(IGNORE_FILES) \
|
|
|
|
) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
|
2005-09-10 17:54:05 +01:00
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
../$(PACKAGE_DIR):
|
|
|
|
ln -s $(PWD) $@
|
2004-03-26 15:19:11 +00:00
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
$(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
|
|
|
|
cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
|
2011-02-12 00:27:22 +00:00
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
$(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
|
|
|
|
gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
|
2011-02-12 00:27:22 +00:00
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
$(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
|
|
|
|
bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
|
2005-09-10 17:54:05 +01:00
|
|
|
|
2011-07-14 17:28:52 +01:00
|
|
|
$(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
|
|
|
|
rm -f $(PACKAGE_NAME).zip ; \
|
2004-03-26 15:19:11 +00:00
|
|
|
cd .. ; \
|
2011-07-14 17:28:52 +01:00
|
|
|
zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
|
|
|
|
mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
|
2005-09-10 17:54:05 +01:00
|
|
|
|
2011-02-12 00:27:22 +00:00
|
|
|
md5: $(ARCHIVES)
|
2011-07-14 17:28:52 +01:00
|
|
|
@-md5sum $(PACKAGE_NAME).tar.gz
|
|
|
|
@-md5sum $(PACKAGE_NAME).tar.bz2
|
|
|
|
@-md5sum $(PACKAGE_NAME).zip
|
|
|
|
|
2011-07-20 04:11:53 +01:00
|
|
|
.PHONY: tarballs md5
|