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 cd src
/glsl
/tests
/ && .
/optimization-test
29 -@touch
$(TOP
)/configs
/current
30 -@for
dir in
$(SUBDIRS
) ; do \
31 if
[ -d
$$dir ] ; then \
32 (cd
$$dir && $(MAKE
) clean) ; \
35 -@
test -s
$(TOP
)/configs
/current ||
rm -f
$(TOP
)/configs
/current
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
'{}' ';'
51 @for
dir in
$(SUBDIRS
) ; do \
52 if
[ -d
$$dir ] ; then \
53 (cd
$$dir && $(MAKE
) install) || exit
1 ; \
58 .PHONY
: default doxygen
clean realclean distclean install check
60 # If there's no current configuration file
61 $(TOP
)/configs
/current
:
64 @echo
"Please choose a configuration from the following list:"
65 @ls
-1 $(TOP
)/configs | grep
-v
"current\|default\|CVS\|autoconf.*"
67 @echo
"Then type 'make <config>' (ex: 'make linux-x86')"
69 @echo
"Or, run './configure' then 'make'"
70 @echo
"See './configure --help' for details"
72 @echo
"(ignore the following error message)"
76 # Rules to set/install a specific build configuration
85 catamount-osmesa-pgi \
98 hpux11-32-static-nothreads \
126 linux-ia64-icc-static \
133 linux-osmesa-static \
135 linux-osmesa16-static \
150 linux-x86-64-profile \
151 linux-x86-64-static \
160 solaris-x86-gcc-static \
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" ; \
180 cd configs
&& rm -f current
&& ln
-s
$@ current
; \
185 # Rules for making release tarballs
187 PACKAGE_VERSION
=8.1-devel
188 PACKAGE_DIR
= Mesa-
$(PACKAGE_VERSION
)
189 PACKAGE_NAME
= MesaLib-
$(PACKAGE_VERSION
)
195 tests
/glx
/Makefile.in \
196 src
/glsl
/glsl_parser.
cpp \
197 src
/glsl
/glsl_parser.h \
198 src
/glsl
/glsl_lexer.
cpp \
199 src
/glsl
/glcpp
/glcpp-lex.c \
200 src
/glsl
/glcpp
/glcpp-parse.c \
201 src
/glsl
/glcpp
/glcpp-parse.h \
202 src
/mesa
/main
/api_exec_es1.c \
203 src
/mesa
/main
/api_exec_es1_dispatch.h \
204 src
/mesa
/main
/api_exec_es1_remap_helper.h \
205 src
/mesa
/main
/api_exec_es2.c \
206 src
/mesa
/main
/api_exec_es2_dispatch.h \
207 src
/mesa
/main
/api_exec_es2_remap_helper.h \
208 src
/mesa
/program
/lex.yy.c \
209 src
/mesa
/program
/program_parse.tab.c \
210 src
/mesa
/program
/program_parse.tab.h
217 -@touch
$(TOP
)/configs
/current
218 $(MAKE
) -C src
/glsl glsl_parser.
cpp glsl_parser.h glsl_lexer.
cpp
219 $(MAKE
) -C src
/glsl
/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
220 $(MAKE
) -C src
/mesa program
/lex.yy.c program
/program_parse.tab.c program
/program_parse.tab.h
222 # Everything for new a Mesa release:
223 ARCHIVES
= $(PACKAGE_NAME
).
tar.gz \
224 $(PACKAGE_NAME
).
tar.bz2 \
225 $(PACKAGE_NAME
).zip \
228 rm -f ..
/$(PACKAGE_DIR
) $(PACKAGE_NAME
).
tar
230 # Helper for autoconf builds
235 aclocal.m4
: configure.ac acinclude.m4
236 $(ACLOCAL
) $(ACLOCAL_FLAGS
)
237 configure
: configure.ac aclocal.m4 acinclude.m4
238 $(AUTOCONF
) $(AC_FLAGS
)
242 ls
-1 $(EXTRA_FILES
) ; \
243 git ls-files
$(IGNORE_FILES
) \
244 ) | sed
-e
'/^\(.*\/\)\?\./d' -e
"s@^@$(PACKAGE_DIR)/@" > $@
249 $(PACKAGE_NAME
).
tar: parsers ..
/$(PACKAGE_DIR
) manifest.txt
250 cd ..
; tar -cf
$(PACKAGE_DIR
)/$(PACKAGE_NAME
).
tar -T
$(PACKAGE_DIR
)/manifest.txt
252 $(PACKAGE_NAME
).
tar.gz
: $(PACKAGE_NAME
).
tar ..
/$(PACKAGE_DIR
)
253 gzip
--stdout
--best
$(PACKAGE_NAME
).
tar > $(PACKAGE_NAME
).
tar.gz
255 $(PACKAGE_NAME
).
tar.bz2
: $(PACKAGE_NAME
).
tar
256 bzip2
--stdout
--best
$(PACKAGE_NAME
).
tar > $(PACKAGE_NAME
).
tar.bz2
258 $(PACKAGE_NAME
).zip
: parsers ..
/$(PACKAGE_DIR
) manifest.txt
259 rm -f
$(PACKAGE_NAME
).zip
; \
261 zip
-q
-@
$(PACKAGE_NAME
).zip
< $(PACKAGE_DIR
)/manifest.txt
; \
262 mv
$(PACKAGE_NAME
).zip
$(PACKAGE_DIR
)
265 @
-md5sum
$(PACKAGE_NAME
).
tar.gz
266 @
-md5sum
$(PACKAGE_NAME
).
tar.bz2
267 @
-md5sum
$(PACKAGE_NAME
).zip
271 .PHONY
: tarballs md5 am--refresh