1b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar###
2b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar# Configuration variables.
3b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
4866d2824095a5bc78307c103347695b52f3d49f0Daniel DunbarOS := $(shell uname)
5866d2824095a5bc78307c103347695b52f3d49f0Daniel Dunbar
6557a6eace292091d14419a334e8d62d9ec9e772bDaniel Dunbar# Assume make is always run from top-level of source directory. Note than an
7557a6eace292091d14419a334e8d62d9ec9e772bDaniel Dunbar# Apple style build overrides these variables later in the makefile.
8b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarProjSrcRoot := $(shell pwd)
9b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarProjObjRoot := $(ProjSrcRoot)
10b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
11401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar# The list of modules which are required to be built into every library. This
12401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar# should only be used for internal utilities which could be used in any other
13401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar# module. Any other cases the platform should be allowed to opt-in to.
14401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel DunbarAlwaysRequiredModules := int_util
15401f693a874c0f2fd9e37173e3ab7045a1bdeb3dDaniel Dunbar
16b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar###
17b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar# Tool configuration variables.
18b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
19b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar# FIXME: LLVM uses autoconf/mkinstalldirs ?
20b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarMKDIR := mkdir -p
21b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarDATE := date
22b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarLIPO := lipo
23866d2824095a5bc78307c103347695b52f3d49f0Daniel DunbarCP := cp
24b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
25a68b0e41908d057f81f31e25346c8b96436b7e4bDaniel DunbarVERBOSE := 0
26faf0150036689985ecea64e78f2637093857cd7bDaniel DunbarDEBUGMAKE :=
27a68b0e41908d057f81f31e25346c8b96436b7e4bDaniel Dunbar
28b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar###
29b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar# Automatic and derived variables.
30b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
31b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar# Adjust settings for verbose mode
32a68b0e41908d057f81f31e25346c8b96436b7e4bDaniel Dunbarifneq ($(VERBOSE),1)
33b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar  Verb := @
34b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarelse
35557a6eace292091d14419a334e8d62d9ec9e772bDaniel Dunbar  Verb :=
36b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarendif
37b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
38b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel DunbarEcho := @echo
39b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarifndef Summary
4048464e0ee1c2de5bcbf0d609348f55d0c301085dDaniel Dunbar  Summary = $(Echo)
41b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarendif
42e235715748826c91f115d11f46d0ff2017d45d2fKostya Serebryany
43e235715748826c91f115d11f46d0ff2017d45d2fKostya Serebryany###
44e235715748826c91f115d11f46d0ff2017d45d2fKostya Serebryany# Common compiler options
45d865fecddccebf898ceed24d096fc58fb29a6e57Chandler CarruthCOMMON_CXXFLAGS=-fno-exceptions -fPIC -funwind-tables -I${ProjSrcRoot}/lib -I${ProjSrcRoot}/include
46803c124c0ab2525b5ab9dcadb110afc60250407bKostya SerebryanyCOMMON_CFLAGS=-fPIC
47