wallet-core/packages/anastasis-cli/Makefile

43 lines
1.1 KiB
Makefile

# This Makefile has been placed in the public domain.
ifeq ($(TOPLEVEL), yes)
$(info top-level build)
-include ../../.config.mk
override DESTDIR := $(TOP_DESTDIR)
else
$(info package-level build)
-include ../../.config.mk
-include .config.mk
endif
$(info prefix is $(prefix))
all:
@echo use 'make install' to build and install anastasis-cli
ifndef prefix
.PHONY: warn-noprefix install
warn-noprefix:
@echo "no prefix configured, did you run ./configure?"
install: warn-noprefix
else
bindir = $(DESTDIR)$(prefix)/bin
libdir = $(DESTDIR)$(prefix)/lib/anastasis-cli
nodedir = $(libdir)/node_modules/anastasis-cli
.PHONY: install install-nodeps deps
install-nodeps:
./build-node.mjs
install -d $(bindir)
install -d $(nodedir)/bin
install -d $(nodedir)/dist
install ./dist/anastasis-cli-bundled.cjs $(nodedir)/dist/
install ./dist/anastasis-cli-bundled.cjs.map $(nodedir)/dist/
install ./bin/anastasis-cli.mjs $(nodedir)/bin/
ln -sf $(nodedir)/bin/anastasis-cli.mjs $(bindir)/anastasis-cli
deps:
pnpm install --frozen-lockfile --filter @gnu-taler/anastasis-cli...
install:
$(MAKE) deps
$(MAKE) install-nodeps
endif