Initial stab at LLVM integration.
[mesa.git] / configs / default
1 # Default/template configuration
2
3 # This is included by other config files which may override some
4 # of these variables.
5 # Think of this as a base class from which configs are derived.
6
7
8 CONFIG_NAME = default
9
10 # Version info
11 MESA_MAJOR=7
12 MESA_MINOR=1
13 MESA_TINY=0
14
15 # external projects. This should be useless now that we use libdrm.
16 DRM_SOURCE_PATH=$(TOP)/../drm
17
18 # Compiler and flags
19 CC = cc
20 CXX = CC
21 CFLAGS = -O
22 CXXFLAGS = -O
23 GLU_CFLAGS =
24
25 # Misc tools and flags
26 MKLIB_OPTIONS =
27 MKDEP = makedepend
28 MKDEP_OPTIONS = -fdepend
29 MAKE = make
30 INSTALL = $(TOP)/bin/minstall
31
32 # Python and flags (generally only needed by the developers)
33 PYTHON2 = python
34 PYTHON_FLAGS = -t -O -O
35
36 # Library names (base name)
37 GL_LIB = GL
38 GLU_LIB = GLU
39 GLUT_LIB = glut
40 GLW_LIB = GLw
41 OSMESA_LIB = OSMesa
42
43
44 # Library names (actual file names)
45 GL_LIB_NAME = lib$(GL_LIB).so
46 GLU_LIB_NAME = lib$(GLU_LIB).so
47 GLUT_LIB_NAME = lib$(GLUT_LIB).so
48 GLW_LIB_NAME = lib$(GLW_LIB).so
49 OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
50
51
52 # Optional assembly language optimization files for libGL
53 ASM_SOURCES =
54
55 # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
56 # order to build the Motif widget too)
57 GLW_SOURCES = GLwDrawA.c
58
59
60 # Directories to build
61 LIB_DIR = lib
62 SRC_DIRS = mesa glu glut/glx glw
63 GLU_DIRS = sgi
64 DRIVER_DIRS = x11 osmesa
65 # Which subdirs under $(TOP)/progs/ to enter:
66 PROGRAM_DIRS = demos redbook samples glsl xdemos
67
68 LLVM_VERSION := $(shell llvm-config --version)
69
70 ifeq ($(LLVM_VERSION),)
71 $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path)
72 MESA_NO_LLVM=1
73 else
74 MESA_NO_LLVM=0
75 $(info Using LLVM version: $(LLVM_VERSION))
76 endif
77
78 ifeq ($(MESA_NO_LLVM),0)
79 LLVM_CFLAGS=`llvm-config --cflags` -DMESA_NO_LLVM=0
80 LLVM_CXXFLAGS=`llvm-config --cxxflags` -DMESA_NO_LLVM=0 -Wno-long-long
81 LLVM_LDFLAGS=`llvm-config --ldflags`
82 LLVM_LIBS=`llvm-config --libs`
83 else
84 LLVM_CFLAGS=-DMESA_NO_LLVM=1
85 LLVM_CXXFLAGS=-DMESA_NO_LLVM=1
86 endif
87
88 # Library/program dependencies
89 #EXTRA_LIB_PATH ?=
90 GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
91 OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
92 GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
93 GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
94 GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
95 APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
96
97
98
99 # Installation directories (for make install)
100 INSTALL_DIR = /usr/local
101 DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
102
103 # Where libGL will look for DRI hardware drivers
104 DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
105