blob: c8529c7687c27e3a9e7c19134be523758f700f64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# 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 taler-wallet-cli
ifndef prefix
.PHONY: warn-noprefix install
warn-noprefix:
@echo "no prefix configured, did you run ./configure?"
install: warn-noprefix
else
LIBDIR = $(prefix)/lib/taler-wallet-cli
BINDIR=$(prefix)/bin
NODEDIR=$(LIBDIR)/node_modules/taler-wallet-cli
.PHONY: install install-nodeps deps
install-nodeps:
./build-node.mjs
@echo installing wallet CLI to $(DESTDIR)$(prefix)
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/ \
|| echo "sqlite3 unavailable, better-sqlite3 native module not found"
ln -sf ../lib/taler-wallet-cli/node_modules/taler-wallet-cli/bin/taler-wallet-cli.mjs $(DESTDIR)$(BINDIR)/taler-wallet-cli
deps:
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli...
pnpm run --filter @gnu-taler/taler-wallet-cli... compile
install:
$(MAKE) deps
$(MAKE) install-nodeps
endif
.PHONY: deb
deb:
dpkg-buildpackage -rfakeroot -b -uc -us
|