Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit f068043

Browse files
author
HYChang
committed
fix(endpoint): Rename conflict macro
This commit changed the macro TARGET to EP_TARGET. To avoid the conflict macro which also defined in Legato AF. Close #696
1 parent fe2b9c6 commit f068043

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PEM_DIR = pem
77
PEM := $(PEM_DIR)/cert.pem
88
OUTPUT_BASE_DIR := output_base
99
# Endpoint build target. The default intends to the platform of your development system.
10-
TARGET := simulator
10+
EP_TARGET := simulator
1111
# Build test suite
1212
TESTS := false
1313
# Enable endpoint HTTPS connection to tangle-accelerator.
@@ -43,14 +43,14 @@ ifdef EP_SSL_SEED
4343
endif
4444

4545
# Pass target into endpoint build process
46-
LEGATO_FLAGS += -DTARGET=$(TARGET)
46+
LEGATO_FLAGS += -DEP_TARGET=$(EP_TARGET)
4747

4848
# Prepend the "-C" flag at the beginging for passing cflags into mkapp
4949
LEGATO_FLAGS := $(foreach flags, $(LEGATO_FLAGS), -C $(flags))
5050

5151
# Include the build command from the specific target
52-
include endpoint/platform/$(TARGET)/build.mk
53-
export TARGET
52+
include endpoint/platform/$(EP_TARGET)/build.mk
53+
export EP_TARGET
5454

5555
all: $(DEPS) cert
5656

docs/endpoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ For setting `host`, `port` and `ssl seed` during compile-time. Add `EP_TA_HOST=x
5959
```shell
6060
$ git clone https://github.com/DLTcollab/tangle-accelerator.git
6161
$ cd tangle-accelerator
62-
$ make TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato # build endpoint as wp77xx target, and set the connected host to "node.deviceproof.org" with port 5566
63-
$ make TESTS=true TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato # build endpoint as wp77xx target in test mode
62+
$ make EP_TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato # build endpoint as wp77xx target, and set the connected host to "node.deviceproof.org" with port 5566
63+
$ make TESTS=true EP_TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato # build endpoint as wp77xx target in test mode
6464
```
6565

6666
#### How to build endpoint application for native target

endpoint/endpointComp/Component.cdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sources:
44
${CURDIR}/../hal/device.c
55

66
// include the specific platform
7-
${CURDIR}/../platform/${TARGET}/impl.c
7+
${CURDIR}/../platform/${EP_TARGET}/impl.c
88

99
${CURDIR}/../../output_base/external/org_iota_common/utils/logger_helper.c
1010

endpoint/endpointComp/endpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ COMPONENT_INIT {
125125
memcpy(iv, test_iv, AES_IV_SIZE);
126126
srand(time(NULL));
127127

128-
device_t* device = ta_device(STRINGIZE(TARGET));
128+
device_t* device = ta_device(STRINGIZE(EP_TARGET));
129129
device->op->get_key(private_key);
130130
device->op->get_device_id(device_id);
131131

tests/endpoint/test-WP77.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ source $COMMON_FILE
1414
# setup WP77 leaf shell
1515
setup_leaf "swi-wp77_3.4.0"
1616

17-
make TESTS=true TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato && \
17+
make TESTS=true EP_TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato && \
1818
tar zcf endpoint.tgz endpoint/_build_endpoint/wp77xx/app/endpoint/staging/read-only/

0 commit comments

Comments
 (0)