forked from nnao45/full-routaas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (25 loc) 路 725 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
GO15VENDOREXPERIMENT=1
NAME := full-routaas
TARGET := $(NAME)
VERSION := 1.0.0
DIST_DIRS := find * -type d -exec
SRCS := $(shell find . -type f -name '*.go')
LDFLAGS := -ldflags="-s -w -X \"main.version=$(VERSION)\" -extldflags \"-static\""
$(TARGET): $(SRCS)
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o $(NAME)
.PHONY: mibupdate clean upde dep dep-install build run launch
ribupdate:
./get-fullroute-rib.sh
clean:
rm -f full-routaas
rm -f rib*
upde:
dep ensure -update
dep:
dep ensure
dep-install:
go get -u github.com/golang/dep/cmd/dep
build:
docker build -t nnao45/full-routaas .
run:
docker run -it --rm --privileged -p 179:179 nnao45/full-routaas:latest