INSTALL = @INSTALL@
# Python and flags (generally only needed by the developers)
-PYTHON2 = python
+PYTHON2 = @PYTHON2@
PYTHON_FLAGS = -t -O -O
# Library names (base name)
AC_PROG_CC
AC_PROG_CXX
AC_CHECK_PROGS([MAKE], [gmake make])
+AC_CHECK_PROGS([PYTHON2], [python2 python])
AC_PATH_PROG([MKDEP], [makedepend])
AC_PATH_PROG([SED], [sed])
echo " CFLAGS: $cflags"
echo " CXXFLAGS: $cxxflags"
echo " Macros: $defines"
+echo ""
+echo " PYTHON2: $PYTHON2"
echo ""
echo " Run '${MAKE-make}' to build Mesa"
indices/u_indices_gen.c: indices/u_indices_gen.py
- python $< > $@
+ $(PYTHON2) $< > $@
indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
- python $< > $@
+ $(PYTHON2) $< > $@
util/u_format_srgb.c: util/u_format_srgb.py
- python $< > $@
+ $(PYTHON2) $< > $@
util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv
- python util/u_format_table.py util/u_format.csv > $@
+ $(PYTHON2) util/u_format_table.py util/u_format.csv > $@
util/u_half.c: util/u_half.py
- python util/u_half.py > $@
+ $(PYTHON2) util/u_half.py > $@
PROGS_DEPS := ../../auxiliary/libgallium.a
lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py ../../auxiliary/util/u_format_pack.py ../../auxiliary/util/u_format.csv
- python lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@
+ $(PYTHON2) $(PYTHON_FLAGS) lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@
LDFLAGS += $(LLVM_LDFLAGS)
LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) $(GL_LIB_DEPS)
cp builtins/tools/builtin_function.cpp .
make glsl_compiler
@echo Regenerating builtin_function.cpp...
- ./builtins/tools/generate_builtins.py > builtin_function.cpp
+ $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py > builtin_function.cpp
@echo Rebuilding the real compiler...
make glsl_compiler
# Default target options.h
options.h: t_options.h mo
- python gen_xmlpool.py $(LANGS) > options.h
+ $(PYTHON2) $(PYTHON_FLAGS) gen_xmlpool.py $(LANGS) > options.h
# Update .mo files from the corresponding .po files.
mo: