commit 4eff6fc806be595864c290a6d04f8216ec7c93ea parent a8d38d25283e14545c25e84a19fdea166ac13cd2 Author: Sean Enck <sean@ttypty.com> Date: Thu, 14 Jul 2022 18:35:58 -0400 fixing up makefile Diffstat:
| M | Makefile | | | 10 | ++++------ |
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,15 +1,13 @@ VERSION := development DESTDIR := -TARGETS := $(shell ls cmd/) -SOURCE := $(shell find cmd/ -type f) $(shell find internal/ -type f) -LIBEXEC := $(DESTDIR)libexec/lockbox/ BUILD := bin/ +TARGETS := $(BUILD)lb $(BUILD)lb-rw $(BUILD)lb-bash $(BUILD)lb-rekey $(BUILD)lb-diff $(BUILD)lb-totp +LIBEXEC := $(DESTDIR)libexec/lockbox/ all: $(TARGETS) -$(TARGETS): $(SOURCE) - mkdir -p $(BUILD) - go build -ldflags '-X main.version=$(VERSION() -X main.libExec=$(LIBEXEC)' -trimpath -buildmode=pie -mod=readonly -modcacherw -o $(BUILD)$@ cmd/$@/main.go +$(TARGETS): cmd/$@/* internal/* + go build -ldflags '-X main.version=$(VERSION) -X main.libExec=$(LIBEXEC)' -trimpath -buildmode=pie -mod=readonly -modcacherw -o $@ cmd/$(shell basename $@)/main.go check: $(TARGETS) cd tests && ./run.sh ../$(BUILD)