Files
sam-forwarder/Makefile

61 lines
1.5 KiB
Makefile
Raw Normal View History

2018-07-21 07:11:54 -04:00
GOPATH = $(PWD)/.go
2018-07-30 22:01:05 -04:00
appname = ephsite
echo:
@echo "$(GOPATH)"
2018-07-28 03:41:33 -04:00
find . -name "*.go" -exec gofmt -w {} \;
2018-07-30 22:01:05 -04:00
find . -name "*.i2pkeys" -exec rm {} \;
2018-07-27 12:37:11 -04:00
2018-07-28 04:33:43 -04:00
test:
go test
cd udp && go test
2018-07-28 04:33:43 -04:00
deps:
go get -u github.com/zieckey/goini
2018-07-26 18:05:56 -04:00
go get -u github.com/eyedeekay/sam-forwarder
2018-07-30 19:26:31 -04:00
go get -u github.com/eyedeekay/sam-forwarder/udp
2018-07-29 00:56:05 -04:00
go get -u github.com/eyedeekay/sam-forwarder/config
go get -u github.com/kpetku/sam3
2018-08-08 16:13:09 -04:00
build: clean bin/$(appname)
bin/$(appname):
mkdir -p bin
2018-07-30 22:01:05 -04:00
cd main && go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o ../bin/$(appname)
2018-08-08 16:13:09 -04:00
server: clean-server bin/eephttpd
bin/eephttpd:
mkdir -p bin
go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o ../bin/eephttpd ./example/serve.go
all: build server
clean:
2018-07-30 22:01:05 -04:00
rm -f bin/$(appname)
2018-08-08 16:13:09 -04:00
clean-server:
rm -f bin/eephttpd
noopts: clean
mkdir -p bin
2018-07-30 22:01:05 -04:00
cd main && go build -o ../bin/$(appname)
2018-07-28 03:41:33 -04:00
2018-07-28 04:07:21 -04:00
gendoc: build
2018-07-30 22:01:05 -04:00
@echo "$(appname) - Easy forwarding of local services to i2p" > USAGE.md
2018-07-28 03:41:33 -04:00
@echo "==================================================" >> USAGE.md
@echo "" >> USAGE.md
2018-07-30 22:01:05 -04:00
@echo "$(appname) is a forwarding proxy designed to configure a tunnel for use" >> USAGE.md
2018-07-28 03:51:05 -04:00
@echo "with i2p. It can be used to easily forward a local service to the" >> USAGE.md
@echo "i2p network using i2p's SAM API instead of the tunnel interface." >> USAGE.md
2018-07-28 03:41:33 -04:00
@echo "" >> USAGE.md
@echo "usage:" >> USAGE.md
@echo "------" >> USAGE.md
@echo "" >> USAGE.md
2018-07-28 03:51:05 -04:00
@echo '```' >> USAGE.md
2018-07-30 22:01:05 -04:00
./bin/$(appname) -h 2>> USAGE.md; true
2018-07-28 03:51:05 -04:00
@echo '```' >> USAGE.md