-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #9 #10 Signed-off-by: Timothy Rule (VM/EMT3) <[email protected]>
- Loading branch information
1 parent
1e6f3eb
commit efb9a3c
Showing
6 changed files
with
54 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,43 @@ | ||
#*************************************************************************** | ||
# Copyright (c) 2021 for information on the respective copyright owner | ||
# see the NOTICE file and/or the following repository: | ||
# https://github.com/boschglobal/automotive-bus-schema | ||
# Copyright 2021 Robert Bosch GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
#*************************************************************************** | ||
|
||
CONTAINER_REPO ?= ghcr.io | ||
CONTAINER_PREFIX ?= boschglobal/automotive-bus-schema- | ||
CONTAINER_TAG ?= main | ||
GCC_BUILDER_IMAGE ?= $(CONTAINER_REPO)/$(CONTAINER_PREFIX)gcc-builder:$(CONTAINER_TAG) | ||
|
||
############### | ||
## Builder Images | ||
FLATC_BUILDER_IMAGE ?= flatc-builder:latest | ||
|
||
ifneq ($(CI), true) | ||
DOCKER_BUILDER_CMD := docker run -it --rm \ | ||
--volume $$(pwd)/../..:/tmp/repo \ | ||
--workdir /tmp/repo/examples/streams \ | ||
$(GCC_BUILDER_IMAGE) | ||
endif | ||
|
||
default: build_docker | ||
.PHONY: build clean do-build run | ||
|
||
all: build | ||
cd build; make | ||
default: build | ||
|
||
build: | ||
mkdir build; | ||
cd build; cmake .. | ||
@${DOCKER_BUILDER_CMD} $(MAKE) do-build | ||
|
||
do-build: | ||
# Build from scratch if no build dir. | ||
@if [ ! -d "build" ]; then \ | ||
mkdir -p build; \ | ||
cd build; \ | ||
cmake .. ; \ | ||
fi | ||
# Build incremental. | ||
cd build; make | ||
cd build; make install | ||
@echo "" | ||
@echo "Sandbox files: - $$(pwd)/build/_out" | ||
@echo "--------------" | ||
@find build/_out/ -type f -name '*' -exec ls -sh --color=auto {} \; | ||
|
||
build_docker: | ||
@docker run -it --rm \ | ||
--volume $$(pwd)/../..:/tmp/repo \ | ||
--workdir /tmp/repo/examples/cmake \ | ||
$(FLATC_BUILDER_IMAGE) \ | ||
/bin/bash -c "make all" | ||
run: | ||
@build/_out/bin/frames | ||
|
||
clean: | ||
rm -rf build | ||
|
||
cleanall: clean | ||
|
||
|
||
.PHONY: default all clean cleanall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters