This repository has been archived by the owner on May 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathMakefile.config
49 lines (36 loc) · 1.84 KB
/
Makefile.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright (c) 2014-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Template configuration file for make.
# You may use $(LEVEL) to refer to the directory containing this file.
# --- targeted clang compiler ----
# Where to find clang installation directories
CLANG_PREFIX?=$(LEVEL)/clang/install
# Where to find clang headers (possibly a list, see below)
CLANG_INCLUDES?=$(CLANG_PREFIX)/include
# example of alternative paths to compile and load the plugin into a locally compiled, not yet installed llvm/clang
#CLANG_PREFIX=llvm-build/Debug+Asserts
#CLANG_INCLUDES=llvm/tools/clang/include llvm-build/tools/clang/include llvm-build/include llvm/include
# target compiler, must match the exact same version of clang as the include files
CLANG?=$(CLANG_PREFIX)/bin/clang
LLVM_CXXFLAGS?=`$(CLANG_PREFIX)/bin/llvm-config --cxxflags 2>/dev/null || true`
LLVM_LDFLAGS?=`$(CLANG_PREFIX)/bin/llvm-config --ldflags --libs --system-libs 2>/dev/null || true`
# --- local clang compiler ---
# Which compiler to use to compile the plugin themselves.
LOCAL_CLANG?=clang
CC=$(LOCAL_CLANG)
CXX=$(LOCAL_CLANG)++
# Which preprocessor to use to extract ATD comments from cpp files.
# @requires clang >= 3.4 (The nonstandard part here is that we want to expand doc-comments contained in macros.)
ATD_CPP?=$(LOCAL_CLANG) -cc1 -E -traditional-cpp -w -P -main-file-name - -o -
# Which preprocessor to use on ocaml "pre-source" files.
OCAML_CPP?=$(LOCAL_CLANG) -cc1 -E -P -x c -main-file-name - -o -
# --- Objective C ---
# Which SDK to use (if any)
SDKPATH?=$(shell ls -d "`xcode-select --print-path 2> /dev/null`"/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk 2> /dev/null | sort -r | head -n 1 || true)
ifeq ($(SDKPATH),)
HAS_OBJC=no
else
HAS_OBJC=yes
endif