Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Commit

Permalink
Add a makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
dashohoxha committed Mar 2, 2016
1 parent dc3ca4c commit 371cf0f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
PREFIX ?= /usr
DESTDIR ?=
BINDIR ?= $(DESTDIR)$(PREFIX)/bin
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
MANDIR ?= $(DESTDIR)$(PREFIX)/share/man/man1

EGPG = $(BINDIR)/egpg
LIB = $(LIBDIR)/egpg

all: install

install:
@install -v -d "$(BINDIR)/"
@install -v -m 0755 src/egpg.sh "$(EGPG)"
@sed -i $(EGPG) -e "s#^LIBDIR=.*#LIBDIR=\"$(LIB)\"#"

@install -v -d "$(LIB)/"
@cp -v -r src/platform src/ext "$(LIB)"

@install -v -d "$(MANDIR)/"
@install -v -m 0644 man/egpg.1 "$(MANDIR)/egpg.1"

uninstall:
@rm -vrf "$(EGPG)" "$(LIB)" "$(MANDIR)/egpg.1"

TESTS = $(sort $(wildcard tests/t*.t))

test: $(TESTS)

$(TESTS):
@$@ $(EGPG_TEST_OPTS)

clean:
$(RM) -rf tests/test-results/ tests/trash\ directory.*/ tests/gnupg/random_seed

.PHONY: install uninstall test clean $(TESTS)

0 comments on commit 371cf0f

Please sign in to comment.