From 54811c724e4418f67ef7ffa76fb77b41ce044062 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 21 Jun 2024 21:30:10 +0200 Subject: [PATCH] Add a simple Makefile for easily building all languages Signed-off-by: Steffen Vogel --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e1b7b033 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +LANGUAGES=python modernpython java javascript cpp + +SCHEMA?=CGMES_2.4.15_27JAN2020 + +ifndef BUILD_IN_DOCKER + CIMGEN=cimgen +else + CIMGEN=docker run --volume "$(shell pwd)/output:/cimgen/output" cimgen + LANGUAGE_DEPS = image +endif + +all: $(LANGUAGES) + +$(LANGUAGES): $(LANGUAGE_DEPS) + $(CIMGEN) \ + --outdir=output/$@/$(SCHEMA) \ + --schemadir=cgmes_schema/$(SCHEMA) \ + --langdir=$@ + +image: + docker build -t cimgen -f Dockerfile . + +.PHONY: all image python modernpython java javascript