Refactor Makefile for flexibility and maintenance

This commit is contained in:
netkas 2024-09-23 13:44:01 -04:00
parent 649d04d8aa
commit 1b94a273b7

View file

@ -1,8 +1,20 @@
# Variables
CONFIG ?= release
LOG_LEVEL = debug
OUTDIR = build/$(CONFIG)
PACKAGE = $(OUTDIR)/net.nosial.configlib.ncc
# Default Target
all: build
# Build Steps
build: build:
ncc build --config="release" --log-level debug ncc build --config=$(CONFIG) --log-level $(LOG_LEVEL)
install: install:
sudo ncc package install --package="build/release/net.nosial.configlib.ncc" --skip-dependencies --reinstall -y --log-level debug ncc package install --package=$(PACKAGE) --skip-dependencies --reinstall -y --log-level $(LOG_LEVEL)
clean: clean:
rm -rf build rm -rf build
.PHONY: all build install clean