You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3 KiB
Makefile

2 months ago
LIBERO_IMAGE := "libero"
MICROCHIP_TOOLS_NETWORK := "microchip_tools_network"
MICROCHIP_TOOLS_POD := "microchip_tools_pod"
LIBERO_CONTAINER ::= "localhost/$(LIBERO_IMAGE):latest"
LIBERO_CONTAINER_HOSTNAME = $(LIBERO_IMAGE)
C_RED= \033[0;31m
C_YELLOW= \033[0;33m
C_GREEN= \033[0;32m
C_END= \033[0m
all: container
build:
podman build . -t $(LIBERO_IMAGE) --volume="${PWD}/../installers:/opt/microchip/installers"
# launch a bash shell in the libero container
debug:
podman run --rm -it --volume="/etc/localtime:/etc/localtime" --network $(MICROCHIP_TOOLS_NETWORK) \
--mac-address ${LIBERO_LICENSE_MAC} -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e "DISPLAY" --security-opt label=type:container_runtime_t ${LIBERO_CONTAINER}
# run libero
run:
podman run -it --volume="/etc/localtime:/etc/localtime" --network $(MICROCHIP_TOOLS_NETWORK) \
--mac-address ${LIBERO_LICENSE_MAC} -v "${XAUTHORITY}:${XAUTHORITY}:ro" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e "DISPLAY" --security-opt label=type:container_runtime_t ${LIBERO_CONTAINER} libero
network:
@podman network create $(MICROCHIP_TOOLS_NETWORK) >/dev/null 2>&1 \
&& printf "${C_GREEN}Created podman network: ${MICROCHIP_TOOLS_NETWORK}${C_END}\n" \
|| printf "${C_YELLOW}network \"${MICROCHIP_TOOLS_NETWORK}\" already exists${C_END}\n"
# end