diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..05516e073ca375d948bc86aa9f0d088c95af6b2c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+CFLAGS += -std=c11 -D_POSIX_SOURCE -Wall -Wconversion -fPIC
+
+goatherd: goatherd.go
+	go build goatherd.go
+
+goatherd_test: goatherd.go goatherd_test.go
+	go test
+
+test: goatherd_test
+
+pam_goatherd.so: pam_goatherd.o
+	$(LINK.c) -lpam -lgnutls -Wl,-soname,$@ -shared $< -o $@
+
+all: goatherd pam_goatherd.so
+
+clean:
+	rm -f pam_goatherd.o pam_goatherd.so goatherd