From 81fe19843ac2afdc4fa1e1c87bc979b295af240e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 22 Apr 2010 14:59:29 +1000 Subject: llvmpipe: add initial autoconf support. allows the swrastg_dri.so to be built with llvmpipe, also links llvm to all dri drivers use --enable-gallium-llvm to use it. Signed-off-by: Dave Airlie --- src/gallium/targets/Makefile.dri | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/gallium/targets/Makefile.dri') diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri index 8efbf4e828..3cbaf615e2 100644 --- a/src/gallium/targets/Makefile.dri +++ b/src/gallium/targets/Makefile.dri @@ -1,5 +1,14 @@ # -*-makefile-*- +ifeq ($(MESA_LLVM),1) +DRIVER_DEFINES += -DGALLIUM_LLVMPIPE +PIPE_DRIVERS += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a +LDFLAGS += $(LLVM_LDFLAGS) +LD = g++ +DRIVER_EXTRAS = $(LLVM_LIBS) +USE_CXX=1 +endif + MESA_MODULES = \ $(TOP)/src/mesa/libmesagallium.a \ $(GALLIUM_AUXILIARIES) @@ -69,7 +78,11 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) Makefile \ $(OBJECTS) $(PIPE_DRIVERS) \ -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \ $(DRI_LIB_DEPS) $(DRIVER_EXTRAS) - $(CC) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS) + if [ "x${USE_CXX}" == "x" ]; then \ + $(CC) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS); \ + else \ + $(CXX) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS); \ + fi @rm -f $@.test mv -f $@.tmp $@ -- cgit v1.2.3