diff options
author | Zack Rusin <[email protected]> | 2007-10-08 10:24:35 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-10-24 11:21:03 -0400 |
commit | b2e529982eb702ea039f6436c9dece39401a4c9c (patch) | |
tree | 631036582a6580c105752b2fbe5ed41fef01225c /configs | |
parent | 4664261f8d8fefa347bf38a224f6584d0fdeebfc (diff) |
Initial stab at LLVM integration.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/default | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configs/default b/configs/default index a7de3f813d6..ac8de653ec3 100644 --- a/configs/default +++ b/configs/default @@ -65,10 +65,29 @@ DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos +LLVM_VERSION := $(shell llvm-config --version) + +ifeq ($(LLVM_VERSION),) + $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path) + MESA_NO_LLVM=1 +else + MESA_NO_LLVM=0 + $(info Using LLVM version: $(LLVM_VERSION)) +endif + +ifeq ($(MESA_NO_LLVM),0) + LLVM_CFLAGS=`llvm-config --cflags` -DMESA_NO_LLVM=0 + LLVM_CXXFLAGS=`llvm-config --cxxflags` -DMESA_NO_LLVM=0 -Wno-long-long + LLVM_LDFLAGS=`llvm-config --ldflags` + LLVM_LIBS=`llvm-config --libs` +else + LLVM_CFLAGS=-DMESA_NO_LLVM=1 + LLVM_CXXFLAGS=-DMESA_NO_LLVM=1 +endif # Library/program dependencies #EXTRA_LIB_PATH ?= -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread +GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm |