Refactor Makefile for flexibility and maintenance
This commit is contained in:
parent
649d04d8aa
commit
1b94a273b7
1 changed files with 15 additions and 3 deletions
16
Makefile
16
Makefile
|
@ -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
|
Loading…
Add table
Reference in a new issue