blob: 6398d058de7630d83094d25bc3bf1354d3b7f729 [file] [log] [blame]
Daniel Dunbarb3a69012009-06-26 16:47:03 +00001###
2# Configuration variables.
3
Daniel Dunbar866d2822009-09-03 20:49:22 +00004OS := $(shell uname)
5
Daniel Dunbar557a6ea2010-01-13 16:13:01 +00006# 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 Dunbarb3a69012009-06-26 16:47:03 +00008ProjSrcRoot := $(shell pwd)
9ProjObjRoot := $(ProjSrcRoot)
10
Daniel Dunbar401f6932011-11-16 01:19:19 +000011# 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.
14AlwaysRequiredModules := int_util
15
Daniel Dunbarb3a69012009-06-26 16:47:03 +000016###
17# Tool configuration variables.
18
Daniel Dunbarb3a69012009-06-26 16:47:03 +000019# FIXME: LLVM uses autoconf/mkinstalldirs ?
20MKDIR := mkdir -p
21DATE := date
Daniel Dunbarb3a69012009-06-26 16:47:03 +000022LIPO := lipo
Daniel Dunbar866d2822009-09-03 20:49:22 +000023CP := cp
Nick Kledzikc0973d62012-11-26 22:48:51 +000024DSYMUTIL := dsymutil
Daniel Dunbarb3a69012009-06-26 16:47:03 +000025
Daniel Dunbara68b0e42010-01-18 06:48:12 +000026VERBOSE := 0
Daniel Dunbarfaf01502010-01-18 06:48:33 +000027DEBUGMAKE :=
Daniel Dunbara68b0e42010-01-18 06:48:12 +000028
Daniel Dunbarb3a69012009-06-26 16:47:03 +000029###
30# Automatic and derived variables.
31
32# Adjust settings for verbose mode
Daniel Dunbara68b0e42010-01-18 06:48:12 +000033ifneq ($(VERBOSE),1)
Daniel Dunbarb3a69012009-06-26 16:47:03 +000034 Verb := @
35else
Daniel Dunbar557a6ea2010-01-13 16:13:01 +000036 Verb :=
Daniel Dunbarb3a69012009-06-26 16:47:03 +000037endif
38
39Echo := @echo
Daniel Dunbarb3a69012009-06-26 16:47:03 +000040ifndef Summary
Daniel Dunbar48464e02010-01-18 06:49:33 +000041 Summary = $(Echo)
Daniel Dunbarb3a69012009-06-26 16:47:03 +000042endif
Kostya Serebryanye2357152011-12-06 21:11:50 +000043
44###
45# Common compiler options
Chandler Carruthd865fec2012-08-29 02:27:54 +000046COMMON_CXXFLAGS=-fno-exceptions -fPIC -funwind-tables -I${ProjSrcRoot}/lib -I${ProjSrcRoot}/include
Kostya Serebryany803c1242011-12-13 18:58:47 +000047COMMON_CFLAGS=-fPIC