]> Cypherpunks.ru repositories - govpn.git/commitdiff
BSD Make compatible makefile
authorSergey Matveev <stargrave@stargrave.org>
Sun, 10 May 2015 09:10:42 +0000 (12:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 10 May 2015 18:47:55 +0000 (21:47 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
doc/installation.texi
doc/makefile
makefile

index c72f62931d6298c5d6a1e9e9433b9d5a89f8328a..75ee4442c0967a659ca7c2c6c6b8ac65497053fb 100644 (file)
@@ -2,8 +2,8 @@
 @unnumbered Installation
 
 GoVPN is written on @url{http://golang.org/, Go programming language},
-@url{https://www.gnu.org/software/make/, GNU Make} is recommended for
-convenient building. @url{https://www.gnu.org/software/texinfo/, Texinfo}
+@emph{Make} is recommended for convenient building.
+@url{https://www.gnu.org/software/texinfo/, Texinfo}
 is used for building documentation.
 
 Included required libraries:
@@ -24,7 +24,7 @@ binaries will be build in the current directory.
 % wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz.sig
 % gpg --verify govpn-2.3.tar.xz.sig govpn-2.3.tar.xz
 % tar xf govpn-2.3.tar.xz
-% gmake -C govpn-2.3 all
+% make -C govpn-2.3 all
 @end example
 
 @menu
index c55b888bae3ce11e256c3b5dbd69aadcb5850908..c959269cf8eb2d679e7540904ec1533eb63b2ebf 100644 (file)
@@ -1,5 +1,7 @@
 all: govpn.info govpn.html
 
+MAKEINFO ?= makeinfo
+
 govpn.info: *.texi handshake.utxt
        makeinfo govpn.texi
 
index 9dbdc546409e57ce1479fa2b2e7514ec08d7b82c..305108ce9ee692b1f4db9ebff239025655a2a7f2 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,9 +1,7 @@
-.PHONY: govpn-client govpn-server govpn-verifier
+GOPATH != pwd
+VERSION != cat VERSION
 
-GOPATH=$(shell pwd)
-export GOPATH
-
-LDFLAGS=-X govpn.Version $(shell cat VERSION)
+LDFLAGS=-X govpn.Version $(VERSION)
 
 all: govpn-client govpn-server govpn-verifier
 
@@ -11,13 +9,13 @@ depends:
        $(MAKE) -C src
 
 govpn-client: depends
-       go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client
+       GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client
 
 govpn-server: depends
-       go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server
+       GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server
 
 govpn-verifier: depends
-       go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier
+       GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier
 
 bench:
-       cd src/govpn ; GOMAXPROC=2 go test -bench .
+       cd src/govpn ; GOPATH=$(GOPATH) GOMAXPROC=2 go test -bench .