forked from aws/aws-fpga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.header.inc
64 lines (55 loc) · 2.21 KB
/
Makefile.header.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
# =============================================================================
# Amazon FPGA Hardware Development Kit
#
# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the License is
# located at
#
# http://aws.amazon.com/asl/
#
# or in the "license" file accompanying this file. This file is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or
# implied. See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
ifndef VIVADO_TOOL_VERSION
$(error Environment variable VIVADO_TOOL_VERSION not set. Please source hdk_setup.sh)
else
$(info VIVADO_TOOL_VERSION = $(VIVADO_TOOL_VERSION))
endif
ifndef CL_DIR
$(error Environment variable CL_DIR not set. Please set CL_DIR to `$AWS_FPGA_REPO_DIR/hdk/cl/examples/<EXAMPLE NAME>`)
else
$(info CL_DIR = $(CL_DIR))
ifneq (1,$(CL_DIR_FORCE))
ifneq (,$(findstring $(CL_DIR),$(PWD)))
$(info Running from $(PWD))
else
$(error CL_DIR cannot be found in PWD=$(PWD). Set `CL_DIR_FORCE=1` to override)
endif
else
$(info Forcing the use of $(CL_DIR) from $(PWD))
endif
endif
include Makefile.tests
export TEST ?= test_null
export C_TEST ?= test_null
# TODO: Come back to this
export SCRIPTS_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
export SDK_DIR = $(AWS_FPGA_REPO_DIR)/sdk
export C_COMMON_DIR = $(HDK_COMMON_DIR)/software
export C_COMMON_SRC_DIR = $(C_COMMON_DIR)/src
export C_SDK_USR_INC_DIR = $(SDK_DIR)/userspace/include
export C_SDK_USR_UTILS_DIR = $(SDK_DIR)/userspace/utils
export C_INC_DIR = $(CL_DIR)/software/runtime
export C_SRC_DIR = $(CL_DIR)/software/src
export C_HEADER_INCLUDE_DIR = $(CL_DIR)/software/include
export TEST_NAME = $(CL_DIR)/verif/tests/$(TEST).sv
ifeq ($(C_TEST),test_null)
export C_TEST_NAME = $(HDK_COMMON_DIR)/software/src/$(C_TEST).c
else
export C_TEST_NAME = $(C_SRC_DIR)/$(C_TEST).c
endif
export SIM_ROOT = $(CL_DIR)/verif/sim/$(SIMULATOR)