Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 1 | ### |
| 2 | # Configuration variables. |
| 3 | |
Daniel Dunbar | 866d282 | 2009-09-03 20:49:22 +0000 | [diff] [blame] | 4 | OS := $(shell uname) |
| 5 | |
Daniel Dunbar | 557a6ea | 2010-01-13 16:13:01 +0000 | [diff] [blame] | 6 | # Assume make is always run from top-level of source directory. Note than an |
| 7 | # Apple style build overrides these variables later in the makefile. |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 8 | ProjSrcRoot := $(shell pwd) |
| 9 | ProjObjRoot := $(ProjSrcRoot) |
| 10 | |
Daniel Dunbar | 401f693 | 2011-11-16 01:19:19 +0000 | [diff] [blame] | 11 | # The list of modules which are required to be built into every library. This |
| 12 | # should only be used for internal utilities which could be used in any other |
| 13 | # module. Any other cases the platform should be allowed to opt-in to. |
| 14 | AlwaysRequiredModules := int_util |
| 15 | |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 16 | ### |
| 17 | # Tool configuration variables. |
| 18 | |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 19 | # FIXME: LLVM uses autoconf/mkinstalldirs ? |
| 20 | MKDIR := mkdir -p |
| 21 | DATE := date |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 22 | LIPO := lipo |
Daniel Dunbar | 866d282 | 2009-09-03 20:49:22 +0000 | [diff] [blame] | 23 | CP := cp |
Nick Kledzik | c0973d6 | 2012-11-26 22:48:51 +0000 | [diff] [blame] | 24 | DSYMUTIL := dsymutil |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 25 | |
Daniel Dunbar | a68b0e4 | 2010-01-18 06:48:12 +0000 | [diff] [blame] | 26 | VERBOSE := 0 |
Daniel Dunbar | faf0150 | 2010-01-18 06:48:33 +0000 | [diff] [blame] | 27 | DEBUGMAKE := |
Daniel Dunbar | a68b0e4 | 2010-01-18 06:48:12 +0000 | [diff] [blame] | 28 | |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 29 | ### |
| 30 | # Automatic and derived variables. |
| 31 | |
| 32 | # Adjust settings for verbose mode |
Daniel Dunbar | a68b0e4 | 2010-01-18 06:48:12 +0000 | [diff] [blame] | 33 | ifneq ($(VERBOSE),1) |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 34 | Verb := @ |
| 35 | else |
Daniel Dunbar | 557a6ea | 2010-01-13 16:13:01 +0000 | [diff] [blame] | 36 | Verb := |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 37 | endif |
| 38 | |
| 39 | Echo := @echo |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 40 | ifndef Summary |
Daniel Dunbar | 48464e0 | 2010-01-18 06:49:33 +0000 | [diff] [blame] | 41 | Summary = $(Echo) |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame] | 42 | endif |
Kostya Serebryany | e235715 | 2011-12-06 21:11:50 +0000 | [diff] [blame] | 43 | |
| 44 | ### |
| 45 | # Common compiler options |
Chandler Carruth | d865fec | 2012-08-29 02:27:54 +0000 | [diff] [blame] | 46 | COMMON_CXXFLAGS=-fno-exceptions -fPIC -funwind-tables -I${ProjSrcRoot}/lib -I${ProjSrcRoot}/include |
Kostya Serebryany | 803c124 | 2011-12-13 18:58:47 +0000 | [diff] [blame] | 47 | COMMON_CFLAGS=-fPIC |