about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-02-04 21:26:23 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-11 13:34:35 +0000
commit03ea0ff5dcee3410d5aa477541c0ef642da4f7ae (patch)
tree2e8e0856b1f936b0c268dc3560ffe8f2ea91dd69 /Makefile
downloadpushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar.gz
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar.bz2
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar.lz
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar.xz
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.tar.zst
pushmail-03ea0ff5dcee3410d5aa477541c0ef642da4f7ae.zip
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
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