Merge branch 'mesa_7_7_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 # Add llvmpipe driver
10 GALLIUM_DRIVERS_DIRS += llvmpipe
11
12 OPT_FLAGS = -g -ansi -pedantic
13 DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
14
15 # override -std=c99
16 CFLAGS += -std=gnu99
17
18 LLVM_VERSION := $(shell llvm-config --version)
19
20 ifeq ($(LLVM_VERSION),)
21 $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path)
22 MESA_LLVM=0
23 else
24 MESA_LLVM=1
25 # $(info Using LLVM version: $(LLVM_VERSION))
26 endif
27
28 ifeq ($(MESA_LLVM),1)
29 # LLVM_CFLAGS=`llvm-config --cflags`
30 LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
31 LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
32 LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation)
33 MKLIB_OPTIONS=-cplusplus
34 else
35 LLVM_CFLAGS=
36 LLVM_CXXFLAGS=
37 endif
38
39 LD = g++
40 GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++ -ludis86