Skip to content

Commit

Permalink
adding change to make
Browse files Browse the repository at this point in the history
Signed-off-by: munapower <[email protected]>
  • Loading branch information
munapower committed Jul 16, 2024
1 parent b09fa76 commit 0320f67
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions samples/deployment/test-network/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ endif
ifeq ($(CC_PATH),)
$(error CC_PATH is not set)
endif
CONTAINER_CLI:="docker"

docker-type:
COMPOSE := $(shell command -v ${CONTAINER_CLI}-compose > /dev/null 2>&1)
if [ $COMPOSE ]; then \
: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} ; \
else \
: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"} ; \
fi
echo "Using ${CONTAINER_CLI} and ${CONTAINER_CLI_COMPOSE}"

build: ercc-container ecc-container

Expand All @@ -26,6 +36,7 @@ ecc-container:
make -C ${FPC_PATH}/ecc DOCKER_IMAGE=fpc/fpc-${CC_ID}$${HW_EXTENSION} DOCKER_ENCLAVE_SO_PATH=${CC_PATH}/_build/lib all docker

ercc-ecc-start:
docker-type
if [ ! -z "${DOCKERD_FPC_PATH}" ]; then \
export SGX_CREDENTIALS_PATH="${DOCKERD_FPC_PATH}/integration/config/ias"; \
fi && \
Expand All @@ -35,7 +46,7 @@ ercc-ecc-start:
SGX_DEVICE_PATH=$$(if [ -e "/dev/isgx" ]; then echo "/dev/isgx"; elif [ -e "/dev/sgx/enclave" ]; then echo "/dev/sgx/enclave"; else echo "none"; fi) && \
[ "$${SGX_DEVICE_PATH}" != "none" ] || ( echo "ERROR: SGX_MODE is HW but no sgx device found"; exit 1; ) \
fi && \
env CC_ID=${CC_ID} FPC_VERSION=${FPC_VERSION} docker-compose up
env CC_ID=${CC_ID} FPC_VERSION=${FPC_VERSION} ${CONTAINER_CLI_COMPOSE} up

ercc-ecc-stop:
env CC_ID=${CC_ID} FPC_VERSION=${FPC_VERSION} docker-compose down
env CC_ID=${CC_ID} FPC_VERSION=${FPC_VERSION} ${CONTAINER_CLI_COMPOSE} down

0 comments on commit 0320f67

Please sign in to comment.