2022-10-28 14:58:08 +02:00
|
|
|
# This Makefile has been placed in the public domain.
|
|
|
|
|
2023-06-21 09:44:02 +02:00
|
|
|
ifeq ($(TOPLEVEL), yes)
|
|
|
|
$(info top-level build)
|
|
|
|
-include ../../.config.mk
|
2023-09-28 17:50:53 +02:00
|
|
|
override DESTDIR := $(TOP_DESTDIR)
|
2023-06-21 09:44:02 +02:00
|
|
|
else
|
|
|
|
$(info package-level build)
|
|
|
|
-include ../../.config.mk
|
|
|
|
-include .config.mk
|
|
|
|
endif
|
2022-10-28 14:58:08 +02:00
|
|
|
|
2022-10-31 16:06:22 +01:00
|
|
|
$(info prefix is $(prefix))
|
|
|
|
|
2022-10-28 14:58:08 +02:00
|
|
|
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
|
2023-09-28 18:42:14 +02:00
|
|
|
LIBDIR = $(prefix)/lib/taler-wallet-cli
|
|
|
|
BINDIR=$(prefix)/bin
|
2023-09-28 17:50:53 +02:00
|
|
|
NODEDIR=$(LIBDIR)/node_modules/taler-wallet-cli
|
2023-02-09 23:42:44 +01:00
|
|
|
.PHONY: install install-nodeps deps
|
|
|
|
install-nodeps:
|
2023-02-21 21:38:57 +01:00
|
|
|
./build-node.mjs
|
2023-09-28 17:50:53 +02:00
|
|
|
@echo installing wallet CLI to $(DESTDIR)$(prefix)
|
2023-09-28 18:42:14 +02:00
|
|
|
install -d $(DESTDIR)$(BINDIR)
|
|
|
|
install -d $(DESTDIR)$(LIBDIR)/build
|
|
|
|
install -d $(DESTDIR)$(NODEDIR)/bin
|
|
|
|
install -d $(DESTDIR)$(NODEDIR)/dist
|
|
|
|
install ./dist/taler-wallet-cli-bundled.cjs $(DESTDIR)$(NODEDIR)/dist/
|
|
|
|
install ./dist/taler-wallet-cli-bundled.cjs.map $(DESTDIR)$(NODEDIR)/dist/
|
|
|
|
install ./bin/taler-wallet-cli.mjs $(DESTDIR)$(NODEDIR)/bin/
|
|
|
|
install ../idb-bridge/node_modules/better-sqlite3/build/Release/better_sqlite3.node $(DESTDIR)$(LIBDIR)/build/ \
|
2023-07-11 15:41:48 +02:00
|
|
|
|| echo "sqlite3 unavailable, better-sqlite3 native module not found"
|
2023-09-28 18:42:14 +02:00
|
|
|
ln -sf ../lib/taler-wallet-cli/node_modules/taler-wallet-cli/bin/taler-wallet-cli.mjs $(DESTDIR)$(BINDIR)/taler-wallet-cli
|
2023-02-09 23:42:44 +01:00
|
|
|
deps:
|
|
|
|
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli...
|
2023-09-11 19:56:32 +02:00
|
|
|
pnpm run --filter @gnu-taler/taler-wallet-cli... compile
|
2023-02-09 23:42:44 +01:00
|
|
|
install:
|
|
|
|
$(MAKE) deps
|
|
|
|
$(MAKE) install-nodeps
|
2022-10-28 14:58:08 +02:00
|
|
|
endif
|