PicoLisp implementation of the BOAWP specification https://boawp.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.1 KiB

11 months ago
# picolisp-boawp Makefile
PIL_MODULE_DIR ?= .modules
PIL_SYMLINK_DIR ?= .lib
REPO_PREFIX ?= https://github.com/aw
## Edit below
BUILD_REPO = $(REPO_PREFIX)/pilrust.git
BUILD_DIR = $(PIL_MODULE_DIR)/pilrust/HEAD
BUILD_REF = master
LIB_NAME = libpilrust.so
TARGET = target/release/$(LIB_NAME)
## Edit above
# Unit testing
TEST_REPO = $(REPO_PREFIX)/picolisp-unit.git
TEST_DIR = $(PIL_MODULE_DIR)/picolisp-unit/HEAD
TEST_REF = v3.1.0
# Generic
.PHONY: all clean
all: $(BUILD_DIR) $(BUILD_DIR)/$(TARGET) symlink
$(BUILD_DIR):
mkdir -p $(BUILD_DIR) && \
git clone $(BUILD_REPO) $(BUILD_DIR)
$(TEST_DIR):
mkdir -p $(TEST_DIR) && \
git clone $(TEST_REPO) $(TEST_DIR) && \
cd $(TEST_DIR) && \
git checkout $(TEST_REF)
$(BUILD_DIR)/$(TARGET):
cd $(BUILD_DIR) && \
git checkout $(BUILD_REF) && \
cargo build --release && \
strip --strip-unneeded $(TARGET)
symlink:
mkdir -p $(PIL_SYMLINK_DIR) && \
cd $(PIL_SYMLINK_DIR) && \
ln -sf ../$(BUILD_DIR)/$(TARGET) $(LIB_NAME)
check: all $(TEST_DIR)
clean:
cd $(BUILD_DIR) && \
rm -f $(TARGET) && \
cd - && \
cd $(PIL_SYMLINK_DIR) && \
rm -f $(TARGET)