summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..d56521e2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+OS := openbsd netbsd freebsd unix-v10 plan9-4e inferno
+OS_DIRS := $(patsubst %, static/%, $(OS))
+
+all: $(OS_DIRS) manpage man.db
+
+manpage: main.go
+ go build
+
+man.db: $(OS_DIRS)
+ ./build-db $@ create.sql $(OS_DIRS)
+
+$(OS_DIRS):
+ifeq ($(MAKECMDGOALS), clean)
+ $(MAKE) -C $@ clean
+else
+ $(MAKE) -C $@
+endif
+
+clean: $(OS_DIRS)
+ go clean
+ rm -f man.db
+
+.PHONY: all clean $(OS_DIRS)
+