logo

go-deblob

Remove binary blobs from a directory (deprecated, consider <https://git.sr.ht/~lanodan/deblob> instead) git clone https://hacktivis.me/git/go-deblob.git

Makefile (679B)


  1. .POSIX:
  2. PREFIX = /usr/local
  3. BINDIR = $(PREFIX)/bin
  4. MANDIR = $(PREFIX)/share/man
  5. EXE = go-deblob
  6. BLOBS = test/fixtures/hello test/fixtures/hello.a
  7. CFLAGS = -Os -s
  8. all: $(EXE)
  9. go-deblob: *.go go.mod go.sum
  10. go build -mod=`ls -d vendor 2> /dev/null` -o $@
  11. .PHONY: clean
  12. clean:
  13. rm -f $(BLOBS) $(EXE)
  14. test/fixtures/hello.a: test/fixtures/hello
  15. $(AR) -rc $@ $<
  16. .PHONY: test
  17. test: test/fixtures/hello test/fixtures/hello.a
  18. cp -r test/fixtures test/checkDir-fixtures
  19. go test
  20. rm -fr test/checkDir-fixtures
  21. .PHONY: install
  22. install:
  23. mkdir -p $(DESTDIR)$(BINDIR)
  24. cp -p $(EXE) $(DESTDIR)$(BINDIR)/
  25. mkdir -p $(DESTDIR)$(MANDIR)/man1
  26. cp -p $(EXE).1 $(DESTDIR)$(MANDIR)/man1/