This repository has been archived by the owner on Apr 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.common
64 lines (53 loc) · 1.67 KB
/
Makefile.common
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
#
# Common variable and macro definitions used throughout the makefile flow.
#
UAS_TARGET ?= scale_lpc1114fn28
UAS_EXPERIMENT_SRC = $(UAS_ROOT)/experiments/$(UAS_EXPERIMENT)
UAS_EXPERIMENT_BUILD = $(UAS_BUILD)/$(UAS_EXPERIMENT)/$(UAS_TARGET)
TARGET_DIR = $(UAS_ROOT)/target/$(UAS_TARGET)
#
# Experiment Build Macros
# ------------------------------------------------------------
#
#
# Given the global variables defining build directory, experiment name
# and target device, return a name for the experiment binary elf file.
define map_experiment_elf
$(UAS_EXPERIMENT_BUILD)/program${1}.elf
endef
#
# 1. Experiment name
# 2. Target
define map_experiment_elf_full
$(UAS_BUILD)/${1}/${2}/program.elf
endef
#
# Given the global variables defining build directory, experiment name
# and target device, return a name for the experiment disassembly file.
define map_experiment_dis
$(UAS_EXPERIMENT_BUILD)/program${1}.dis
endef
#
# 1. Experiment name
# 2. Target
define map_experiment_dis_full
$(UAS_BUILD)/${1}/${2}/program.dis
endef
#
# Given the global variables defining build directory, experiment name
# and target device, return a name for the experiment hex memory file.
define map_experiment_hex
$(UAS_EXPERIMENT_BUILD)/program${1}.hex
endef
#
# Given the global variables defining build directory, experiment name
# and target device, return a name for the experiment bin memory file.
define map_experiment_bin
$(UAS_EXPERIMENT_BUILD)/program${1}.bin
endef
#
# Given the current target device environment variable, return where
# the makefile defining its "program" target *should* be.
define map_target_program_makefile
$(UAS_ROOT)/target/$(UAS_TARGET)/program/program.mk
endef