33 lines
562 B
Makefile
33 lines
562 B
Makefile
BIN_NAME := Haxe.lua
|
|
MINIFYD_NAME := Haxe.min.lua
|
|
BUILD_DIR := build
|
|
HAXE_FLAGS = -D webconsole
|
|
|
|
BIN_PATH := $(BUILD_DIR)/$(BIN_NAME)
|
|
MIN_PATH := $(BUILD_DIR)/$(MINIFYD_NAME)
|
|
|
|
all: clean $(MIN_PATH)
|
|
|
|
build: $(MIN_PATH)
|
|
|
|
$(BIN_PATH): $(shell find src -name '*.hx')
|
|
haxe build.hxml $(HAXE_FLAGS)
|
|
|
|
$(MIN_PATH): $(BIN_PATH)
|
|
node minify.js $@
|
|
|
|
deps: package.json build.hxml
|
|
haxelib install all --always && yarn install
|
|
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
watch:
|
|
find src -name "*.hx" | entr make build
|
|
|
|
debug:
|
|
craftos --mount-ro /=build
|
|
|
|
webconsole:
|
|
node console.js
|