Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / configs / linux-llvm
1 # -*-makefile-*-
2 # Configuration for Linux and LLVM with debugging info
3 # Builds the llvmpipe gallium driver
4
5 include $(TOP)/configs/linux
6
7 CONFIG_NAME = linux-llvm
8
9 #GALLIUM_AUXILIARY_DIRS += gallivm
10
11 # Add llvmpipe driver
12 GALLIUM_DRIVERS_DIRS += llvmpipe
13
14 OPT_FLAGS = -g -ansi -pedantic
15 DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
16
17 # override -std=c99
18 CFLAGS += -std=gnu99
19
20 LLVM_VERSION := $(shell llvm-config --version)
21
22 ifeq ($(LLVM_VERSION),)
23 $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path)
24 MESA_LLVM=0
25 else
26 MESA_LLVM=1
27 # $(info Using LLVM version: $(LLVM_VERSION))
28 endif
29
30 ifeq ($(MESA_LLVM),1)
31 # LLVM_CFLAGS=`llvm-config --cflags`
32 LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
33 LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
34 LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation)
35 MKLIB_OPTIONS=-cplusplus
36 else
37 LLVM_CFLAGS=
38 LLVM_CXXFLAGS=
39 endif
40
41 LD = g++
42 GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++ -ludis86