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
214 -@touch
$(TOP
)/configs
/current
215 $(MAKE
) -C src
/glsl glsl_parser.
cpp glsl_parser.h glsl_lexer.
cpp
216 $(MAKE
) -C src
/glsl
/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
217 $(MAKE
) -C src
/mesa
/program
lex.yy.c program_parse.tab.c program_parse.tab.h
219 # Everything for new a Mesa release:
220 ARCHIVES
= $(PACKAGE_NAME
).
tar.gz \
221 $(PACKAGE_NAME
).
tar.bz2 \
222 $(PACKAGE_NAME
).zip \
225 rm -f ..
/$(PACKAGE_DIR
) $(PACKAGE_NAME
).
tar
227 # Helper for autoconf builds
232 aclocal.m4
: configure.ac acinclude.m4
233 $(ACLOCAL
) $(ACLOCAL_FLAGS
)
234 configure
: rm_depend configure.ac aclocal.m4 acinclude.m4
235 $(AUTOCONF
) $(AC_FLAGS
)
238 @for dep in
$(DEPEND_FILES
) ; do \
245 ls
-1 $(EXTRA_FILES
) ; \
246 git ls-files
$(IGNORE_FILES
) \
247 ) | sed
-e
'/^\(.*\/\)\?\./d' -e
"s@^@$(PACKAGE_DIR)/@" > $@
252 $(PACKAGE_NAME
).
tar: parsers ..
/$(PACKAGE_DIR
) manifest.txt
253 cd ..
; tar -cf
$(PACKAGE_DIR
)/$(PACKAGE_NAME
).
tar -T
$(PACKAGE_DIR
)/manifest.txt
255 $(PACKAGE_NAME
).
tar.gz
: $(PACKAGE_NAME
).
tar ..
/$(PACKAGE_DIR
)
256 gzip
--stdout
--best
$(PACKAGE_NAME
).
tar > $(PACKAGE_NAME
).
tar.gz
258 $(PACKAGE_NAME
).
tar.bz2
: $(PACKAGE_NAME
).
tar
259 bzip2
--stdout
--best
$(PACKAGE_NAME
).
tar > $(PACKAGE_NAME
).
tar.bz2
261 $(PACKAGE_NAME
).zip
: parsers ..
/$(PACKAGE_DIR
) manifest.txt
262 rm -f
$(PACKAGE_NAME
).zip
; \
264 zip
-q
-@
$(PACKAGE_NAME
).zip
< $(PACKAGE_DIR
)/manifest.txt
; \
265 mv
$(PACKAGE_NAME
).zip
$(PACKAGE_DIR
)
268 @
-md5sum
$(PACKAGE_NAME
).
tar.gz
269 @
-md5sum
$(PACKAGE_NAME
).
tar.bz2
270 @
-md5sum
$(PACKAGE_NAME
).zip
272 .PHONY
: tarballs rm_depend md5