-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake_aveo.inc
67 lines (57 loc) · 1.75 KB
/
make_aveo.inc
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
VE_ARCH ?= ve1
VEBIN ?= /opt/nec/ve/bin
NCPP ?= $(VEBIN)/nc++
NCC ?= $(VEBIN)/ncc
NFORT ?= $(VEBIN)/nfort
NAR ?= $(VEBIN)/nar
GCC = gcc
GPP = g++
AR = ar
DEBUG = -g
OPT = -O2
ifneq ($(MAKECMDGOALS),clean)
ifndef URPC_INST_DIR
$(error "URPC_INST_DIR is undefined! Please point it to the place where veo-urpc is installed.")
endif
endif
VEDEST?=$(DEST)
VEDEST_COM?=$(DEST)
INCL = -I$(BUILD)/include -I$(DEST)/include -I. -I$(URPC_INST_DIR)/include
NINCL = -I$(BUILD)/include -I$(VEDEST)/include -I. -I$(URPC_INST_DIR)/include
ifndef NOCPP17
GPPFLAGS = -std=c++17 -pthread $(OPT) $(DEBUG) $(INCL)
else
GPPFLAGS = -std=gnu++11 -pthread $(OPT) $(DEBUG) $(INCL) -DNOCPP17
endif
GCCFLAGS = -std=c11 -pthread $(OPT) $(DEBUG) $(INCL)
DYN_LINKER :=
ifeq ($(VE_ARCH),ve3)
OPT_ARCH ?= -march=ve3
OPT_ABI ?= -mabi=2
else
# OPT_ARCH ?= -march=ve1
# OPT_ABI ?= -mabi=1
endif
NCCFLAGS = $(FTRACE) -pthread $(OPT) $(DEBUG) $(NINCL) -finline -finline-functions \
$(DYN_LINKER) $(OPT_ARCH) $(OPT_ABI)
NFORTFLAGS = $(FTRACE) -pthread $(OPT) $(DEBUG) $(NINCL) $(DYN_LINKLER) $(OPT_ARCH) $(OPT_ABI)
NCPPFLAGS = $(FTRACE) -std=gnu++11 -pthread $(OPT) $(DEBUG) $(NINCL) -finline -finline-functions \
$(OPT_ARCH) $(OPT_ABI)
LDFLAGS = \
-Wl,-rpath,$(DEST)/lib64 -L$(BLIB) -L$(PERF)$(DEST)/lib64 \
-Wl,-rpath,$(URPC_INST_DIR)/lib64 -L$(URPC_INST_DIR)/lib64 \
-Wl,--build-id=sha1 $(DEBUG)
NLDFLAGS = -Wl,-rpath,$(VEDEST)/lib -L$(BVELIB) -L$(PREF)$(VEDEST)/lib -Wl,--build-id=sha1 $(DEBUG)
# build directory substructure
BVE = $(BUILD)/ve
BVE_OMP = $(BUILD)/ve_omp
BVH = $(BUILD)/vh
BB = $(BUILD)/bin
BLIB = $(BUILD)/lib64
BVELIB = $(BUILD)/lib
BLIBEX = $(BUILD)/libexec
BINC = $(BUILD)/include
BVEINC = $(BUILD)/include-ve
# rule for creating directories
%/:
mkdir -p $@