aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2023-02-04 23:54:03 -0700
committerJordan <me@jordan.im>2023-02-04 23:54:03 -0700
commitc4159d895ac399ca55326f7b4ff8bfbf8402e654 (patch)
tree45340ca429c16f683b375695d01e03d65ebf22b0 /Makefile
downloadpigeon-c4159d895ac399ca55326f7b4ff8bfbf8402e654.tar.gz
pigeon-c4159d895ac399ca55326f7b4ff8bfbf8402e654.zip
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ac4846a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+.POSIX:
+.SUFFIXES:
+
+GO = go
+RM = rm
+GOFLAGS = -o pigeon
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+
+goflags = $(GOFLAGS)
+
+all: pigeon
+
+pigeon:
+ $(GO) build $(goflags) -ldflags "-X main.buildPrefix=$(PREFIX)"
+
+clean:
+ $(RM) -f pigeon
+
+install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp -f pigeon $(DESTDIR)$(BINDIR)
+