2008-01-04 09:27:42 -05:00
|
|
|
# -*-makefile-*-
|
2009-12-18 11:12:59 -07:00
|
|
|
# Configuration for Linux and LLVM with optimizations
|
2009-08-18 16:28:23 -06:00
|
|
|
# Builds the llvmpipe gallium driver
|
2007-10-22 11:00:28 -04:00
|
|
|
|
|
|
|
|
include $(TOP)/configs/linux
|
|
|
|
|
|
2007-11-09 10:08:15 -05:00
|
|
|
CONFIG_NAME = linux-llvm
|
2007-10-22 11:00:28 -04:00
|
|
|
|
2009-08-18 16:58:12 -06:00
|
|
|
# Add llvmpipe driver
|
|
|
|
|
GALLIUM_DRIVERS_DIRS += llvmpipe
|
2008-02-18 14:25:04 +09:00
|
|
|
|
2009-12-18 11:12:59 -07:00
|
|
|
OPT_FLAGS = -O3 -ansi -pedantic
|
2010-03-17 10:53:55 -06:00
|
|
|
ARCH_FLAGS = -mmmx -msse -msse2 -mstackrealign
|
2009-12-18 11:12:59 -07:00
|
|
|
|
2010-12-06 10:10:58 -07:00
|
|
|
DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
|
2009-08-18 16:28:23 -06:00
|
|
|
|
|
|
|
|
# override -std=c99
|
2010-12-03 10:59:52 -07:00
|
|
|
CFLAGS += -std=gnu99
|
2007-10-22 11:00:28 -04:00
|
|
|
|
|
|
|
|
LLVM_VERSION := $(shell llvm-config --version)
|
|
|
|
|
|
|
|
|
|
ifeq ($(LLVM_VERSION),)
|
|
|
|
|
$(warning Could not find LLVM! Make Sure 'llvm-config' is in the path)
|
2007-10-24 08:34:01 -04:00
|
|
|
MESA_LLVM=0
|
2007-10-22 11:00:28 -04:00
|
|
|
else
|
2007-10-24 08:34:01 -04:00
|
|
|
MESA_LLVM=1
|
2010-03-22 13:27:32 -07:00
|
|
|
HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
|
|
|
|
|
DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
|
2009-08-18 16:28:23 -06:00
|
|
|
# $(info Using LLVM version: $(LLVM_VERSION))
|
2007-10-22 11:00:28 -04:00
|
|
|
endif
|
|
|
|
|
|
2007-10-24 08:34:01 -04:00
|
|
|
ifeq ($(MESA_LLVM),1)
|
2010-12-06 10:10:58 -07:00
|
|
|
LLVM_CFLAGS=`llvm-config --cppflags`
|
2009-03-09 16:05:44 +05:30
|
|
|
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
|
2009-08-18 16:28:23 -06:00
|
|
|
LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
|
2010-02-05 01:29:43 -08:00
|
|
|
LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
|
2007-10-25 18:24:51 +02:00
|
|
|
MKLIB_OPTIONS=-cplusplus
|
2007-10-22 11:00:28 -04:00
|
|
|
else
|
2007-10-24 08:34:01 -04:00
|
|
|
LLVM_CFLAGS=
|
|
|
|
|
LLVM_CXXFLAGS=
|
2007-10-22 11:00:28 -04:00
|
|
|
endif
|
|
|
|
|
|
2008-09-30 20:50:49 +02:00
|
|
|
LD = g++
|
2010-08-11 14:28:55 -06:00
|
|
|
GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -ltalloc -lstdc++ -ludis86
|