-
Notifications
You must be signed in to change notification settings - Fork 17
/
config.mk
35 lines (30 loc) · 1.07 KB
/
config.mk
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
CONFIG_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
-include $(CONFIG_DIR)../cheetah_config.mk
COMPILER_BASE?=
CC=$(COMPILER_BASE)clang
CXX=$(COMPILER_BASE)clang++
LINK_CC=$(CC)
LLVM_LINK=$(COMPILER_BASE)llvm-link
LLVM_CONFIG=$(COMPILER_BASE)llvm-config
#
ABI_DEF?=-DOPENCILK_ABI
# If use cheetah
RTS_DIR?=../runtime
RTS_LIB?=libopencilk
RTS_C_PERSONALITY_LIB?=libopencilk-personality-c
RTS_CXX_PERSONALITY_LIB?=libopencilk-personality-cpp
RTS_PEDIGREE_LIB?=libopencilk-pedigrees
# All runtime libraries and associated files will be placed in
# `/oath/to/cheetah/lib/<target-triple>`, so that the compiler can easily find
# all of those files using the flag --opencilk-resource-dir=/path/to/cheetah.
RTS_LIBDIR_NAME?=lib/$(shell $(LLVM_CONFIG) --host-target)
RESOURCE_DIR?=$(CONFIG_DIR)
RTS_LIBDIR?=$(RESOURCE_DIR)/$(RTS_LIBDIR_NAME)
RTS_OPT?=-fopencilk --opencilk-resource-dir=$(RESOURCE_DIR)
#RTS_LIB_FLAG=-lcheetah
#ARCH = -mavx
OPT ?= -O3
DBG ?= -g3
# A large number of processors, system-dependent
# TODO: There should be an additional value meaning "all cores"
MANYPROC ?= 8