forked from fpgasystems/Vitis_with_100Gbps_TCP-IP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
utils.mk
executable file
·92 lines (75 loc) · 2.46 KB
/
utils.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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#+-------------------------------------------------------------------------------
# The following parameters are assigned with default values. These parameters can
# be overridden through the make command line
#+-------------------------------------------------------------------------------
PROFILE := no
#Generates profile summary report
ifeq ($(PROFILE), yes)
LDCLFLAGS += --profile_kernel data:all:all:all
endif
DEBUG := no
B_TEMP = `$(ABS_COMMON_REPO)/common/utility/parse_platform_list.py $(DEVICE)`
#Generates debug summary report
ifeq ($(DEBUG), yes)
LDCLFLAGS += --dk list_ports
endif
#Setting Platform Path
ifeq ($(findstring xpfm, $(DEVICE)), xpfm)
B_NAME = $(shell dirname $(DEVICE))
else
B_NAME = $(B_TEMP)/$(DEVICE)
endif
#Checks for XILINX_VITIS
ifndef XILINX_VITIS
$(error XILINX_VITIS variable is not set, please set correctly and rerun)
endif
#Checks for Device Family
ifeq ($(HOST_ARCH), aarch32)
DEV_FAM = 7Series
else ifeq ($(HOST_ARCH), aarch64)
DEV_FAM = Ultrascale
endif
#Checks for XILINX_XRT
check-xrt:
ifndef XILINX_XRT
$(error XILINX_XRT variable is not set, please set correctly and rerun)
endif
#Checks for Correct architecture
ifneq ($(HOST_ARCH), $(filter $(HOST_ARCH),aarch64 aarch32 x86))
$(error HOST_ARCH variable not set, please set correctly and rerun)
endif
#Checks for SYSROOT
ifneq ($(HOST_ARCH), x86)
ifndef SYSROOT
$(error SYSROOT variable is not set, please set correctly and rerun)
endif
endif
#Checks for g++
ifeq ($(HOST_ARCH), x86)
ifneq ($(shell expr $(shell g++ -dumpversion) \>= 5), 1)
ifndef XILINX_VIVADO
$(error [ERROR]: g++ version older. Please use 5.0 or above.)
else
CXX := $(XILINX_VIVADO)/tps/lnx64/gcc-6.2.0/bin/g++
$(warning [WARNING]: g++ version older. Using g++ provided by the tool : $(CXX))
endif
endif
else ifeq ($(HOST_ARCH), aarch64)
CXX := $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-g++
else ifeq ($(HOST_ARCH), aarch32)
CXX := $(XILINX_VITIS)/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-g++
endif
check-devices:
ifndef DEVICE
$(error DEVICE not set. Please set the DEVICE properly and rerun. Run "make help" for more details.)
endif
# device2xsa - create a filesystem friendly name from device name
# $(1) - full name of device
device2xsa = $(strip $(patsubst %.xpfm, % , $(shell basename $(DEVICE))))
# Cleaning stuff
RM = rm -f
RMDIR = rm -rf
ECHO:= @echo
docs: README.md
README.md: description.json
$(ABS_COMMON_REPO)/common/utility/readme_gen/readme_gen.py description.json