logo

deblob

remove binary executables from a directory git clone https://hacktivis.me/git/deblob.git
commit: 1e05d25828265448cb9bbd6c0330f8f4805b6dd3
parent a8077898b967386c3973a1e077cc06911b8921ae
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 18 Feb 2022 01:19:14 +0100

Makefile: New

Diffstat:

AMakefile34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,34 @@ +.POSIX: + +PREFIX = /usr/local +BINDIR = $(PREFIX)/bin +MANDIR = $(PREFIX)/share/man + +EXE = deblob +TEST_BLOBS = test/fixtures/hello test/fixtures/hello.a test/fixtures/hello.o +CFLAGS = -Os -s + +all: $(EXE) + +deblob: main.ha + hare build + +.PHONY: clean +clean: + rm -f $(EXE) $(TEST_BLOBS) + +test/fixtures/hello.a: test/fixtures/hello + $(AR) -rc $@ $< + +.PHONY: test +test: all $(TEST_BLOBS) + cp -r test/fixtures test/check_dir-fixtures + hare test + rm -fr test/check_dir-fixtures + +.PHONY: install +install: + mkdir -p $(DESTDIR)$(BINDIR) + cp -p $(EXE) $(DESTDIR)$(BINDIR)/ + mkdir -p $(DESTDIR)$(MANDIR)/man1 + cp -p $(EXE).1 $(DESTDIR)$(MANDIR)/man1/