mirror of
https://gitlab.com/jessieh/qrprinter.git
synced 2024-11-24 07:21:46 +00:00
25 lines
488 B
Makefile
25 lines
488 B
Makefile
|
# qrprinter Makefile
|
||
|
# Produces .lua files from the .fnl source files
|
||
|
|
||
|
SRC_DIR = src
|
||
|
BUILD_DIR = build
|
||
|
|
||
|
FENNEL = ./fennel-0.10.0-x86_64
|
||
|
|
||
|
fnl_files := $(shell find $(SRC_DIR)/ -type f -name '*.fnl')
|
||
|
lua_files := $(patsubst $(SRC_DIR)/%.fnl, $(BUILD_DIR)/%.lua, $(fnl_files))
|
||
|
|
||
|
.PHONY: install clean
|
||
|
|
||
|
all: $(lua_files)
|
||
|
|
||
|
install:
|
||
|
@echo "Leaving installation up to luarocks..."
|
||
|
|
||
|
$(BUILD_DIR)/%.lua: $(SRC_DIR)/%.fnl
|
||
|
mkdir -p "$(@D)"
|
||
|
$(FENNEL) --compile $< > $@
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(BUILD_DIR)
|