51 lines
709 B
Makefile
51 lines
709 B
Makefile
##
|
|
# Ncp
|
|
#
|
|
# @file
|
|
# @version 0.1
|
|
|
|
SRC = *.nim
|
|
SRCDIR = src
|
|
BIN = ncp
|
|
PREFIX = /usr/local
|
|
|
|
.PHONY : default
|
|
default: release
|
|
|
|
release:
|
|
nimble build '-d:ssl --cc:clang -d:release'
|
|
|
|
.PHONY: debug
|
|
debug:
|
|
nimble build '-d:ssl --cc:clang'
|
|
|
|
.PHONY: small
|
|
small:
|
|
nimble build '-d:ssl --cc:gcc -d:danger -d:strip --opt:size -d:release --passC:-flto --passL:-flto'
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f ./${BIN}
|
|
|
|
.PHONY: docs
|
|
docs:
|
|
nim doc ${SRCDIR}/${SRC}
|
|
|
|
.PHONY: pretty
|
|
pretty:
|
|
nimpretty ${SRCDIR}/${SRC}
|
|
|
|
.PHONY: test
|
|
test:
|
|
nimble test
|
|
|
|
.PHONY: install
|
|
install: ${BIN}
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin/
|
|
cp $< $(DESTDIR)$(PREFIX)/bin/${BIN}
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/${BIN}
|
|
|
|
# end
|