Kaynağa Gözat

Add Makefile

Dennis Rodewyk 5 yıl önce
ebeveyn
işleme
3aa80c863a
1 değiştirilmiş dosya ile 21 ekleme ve 0 silme
  1. 21 0
      Makefile

+ 21 - 0
Makefile

@@ -0,0 +1,21 @@
+INSTDIR?=/usr/local
+BINDIR?=$(INSTDIR)/bin
+GO?=go
+
+GOSRC!=find . -name '*.go'
+GOSRC+=go.mod go.sum
+
+hugo-encrypt: $(GOSRC)
+	$(GO) build \
+		-o $@
+
+# Exists in GNUMake but not in NetBSD make and others.
+RM?=rm -f
+
+clean:
+	$(RM) hugo-encrypt
+
+install: hugo-encrypt
+	mkdir -p $(BINDIR)
+	install -m755 $< $(BINDIR)/$<
+