diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2026-01-07 00:34:21 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2026-01-07 00:34:21 -0700 |
| commit | c22f4ac5efd093fe15a17f247471d6512548a054 (patch) | |
| tree | 66ab70fa0acc27daf2768e7691bc07f70088477c | |
| parent | 4847aa0b4a6f945c24e1523e729652271bbc9680 (diff) | |
| download | montis-c22f4ac5efd093fe15a17f247471d6512548a054.tar.gz montis-c22f4ac5efd093fe15a17f247471d6512548a054.tar.bz2 montis-c22f4ac5efd093fe15a17f247471d6512548a054.zip | |
[feat] add a basic Makefile which delegates to CMake.
| -rw-r--r-- | Makefile | 34 | ||||
| -rw-r--r-- | README.md | 10 |
2 files changed, 38 insertions, 6 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d814302 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +.PHONY: all configure build ark cross soul run install clean distclean + +BUILD_DIR ?= build +BUILD_TYPE ?= Debug +PREFIX ?= $(HOME)/.local + +all: build + +configure: + cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(CMAKE_ARGS) + +build: configure + cmake --build $(BUILD_DIR) + +ark: configure + cmake --build $(BUILD_DIR) --target ark + +cross: configure + cmake --build $(BUILD_DIR) --target cross + +soul: configure + cmake --build $(BUILD_DIR) --target soul_build + +run: configure + cmake --build $(BUILD_DIR) --target run + +install: configure + cmake --install $(BUILD_DIR) --prefix $(PREFIX) + +clean: + cmake --build $(BUILD_DIR) --target clean + +distclean: + rm -rf $(BUILD_DIR) @@ -119,21 +119,19 @@ This repo uses CMake to build: - the bundled Haskell soul (`montis.so`) via Stack ```sh -cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -cmake --build build +make build ``` To build only the runtime + bridge library (no bundled soul): ```sh -cmake -S . -B build -DMONTIS_BUILD_BUNDLED_SOUL=OFF -cmake --build build +make BUILD_DIR=build BUILD_TYPE=Debug CMAKE_ARGS=-DMONTIS_BUILD_BUNDLED_SOUL=OFF build ``` To run via the CMake helper target: ```sh -cmake --build build --target run +make run ``` Note: the `run` target currently starts `ark` with `-s foot`, so you’ll want @@ -156,7 +154,7 @@ Runtime invocation looks like: ## Installing ```sh -cmake --install build --prefix ~/.local +make install PREFIX=~/.local ``` This installs: |