46 lines
1.6 KiB
Makefile
46 lines
1.6 KiB
Makefile
# This Makefile has been placed in the public domain.
|
|
|
|
ifeq ($(TOPLEVEL), yes)
|
|
$(info top-level build)
|
|
-include ../../.config.mk
|
|
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 taler-wallet-cli
|
|
|
|
ifndef prefix
|
|
.PHONY: warn-noprefix install
|
|
warn-noprefix:
|
|
@echo "no prefix configured, did you run ./configure?"
|
|
install: warn-noprefix
|
|
else
|
|
install_target = $(prefix)/lib/taler-wallet-cli
|
|
.PHONY: install install-nodeps deps
|
|
install-nodeps:
|
|
./build-node.mjs
|
|
@echo installing wallet CLI to $(install_target)
|
|
install -d $(prefix)/bin
|
|
install -d $(install_target)/build
|
|
install -d $(install_target)/bin
|
|
install -d $(install_target)/node_modules/taler-wallet-cli
|
|
install -d $(install_target)/node_modules/taler-wallet-cli/bin
|
|
install -d $(install_target)/node_modules/taler-wallet-cli/dist
|
|
install ./dist/taler-wallet-cli-bundled.cjs $(install_target)/node_modules/taler-wallet-cli/dist/
|
|
install ./dist/taler-wallet-cli-bundled.cjs.map $(install_target)/node_modules/taler-wallet-cli/dist/
|
|
install ./bin/taler-wallet-cli.mjs $(install_target)/node_modules/taler-wallet-cli/bin/
|
|
install ../idb-bridge/node_modules/better-sqlite3/build/Release/better_sqlite3.node $(install_target)/build/ \
|
|
|| echo "sqlite3 unavailable, better-sqlite3 native module not found"
|
|
ln -sf $(install_target)/node_modules/taler-wallet-cli/bin/taler-wallet-cli.mjs $(prefix)/bin/taler-wallet-cli
|
|
deps:
|
|
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli...
|
|
install:
|
|
$(MAKE) deps
|
|
$(MAKE) install-nodeps
|
|
endif
|