diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e608a13 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +CARGO = cargo +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) +MKDIR_P = mkdir -p + +prefix = /usr/local +exec_prefix = $(prefix) +bindir = $(exec_prefix)/bin + +all: release +.PHONY: all + +cargo-deps: vendor/github_schema.graphql src/commit_pr.graphql +.PHONY: cargo-deps + +target/release/pushmail: cargo-deps + $(CARGO) build --release + +target/debug/pushmail: cargo-deps + $(CARGO) build + +release: target/release/pushmail +.PHONY: release + +debug: target/debug/pushmail +.PHONY: debug + +check: cargo-deps + $(CARGO) test +.PHONY: check + +install-dirs: + $(MKDIR_P) $(DESTDIR)$(bindir) +.PHONY: install-dirs + +install: install-dirs + $(INSTALL_PROGRAM) target/release/pushmail $(DESTDIR)$(bindir)/pushmail +.PHONY: install + +uninstall: + rm -f $(DESTDIR)$(bindir)/pushmail +.PHONY: uninstall |