forked from sonic-net/sonic-restapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (19 loc) · 752 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
.PHONY: all install build libcswsscommon clean
GO := /usr/local/go/bin/go
export GOROOT=/usr/local/go
export GOPATH=$(HOME)/go
export GOBIN=$(GOPATH)/bin
all: install build
install: build
/usr/bin/install -D $(GOPATH)/bin/go-server-server debian/sonic-rest-api/usr/sbin/go-server-server
build: $(GOPATH)/bin/go-server-server
$(GOPATH)/bin/go-server-server: libcswsscommon $(GOPATH)/src/go-server-server/main.go
cd $(GOPATH)/src/go-server-server && $(GO) get -v && $(GO) build -v
$(GOPATH)/src/go-server-server/main.go:
mkdir -p $(GOPATH)/src
cp -r go-server-server $(GOPATH)/src/go-server-server
cp -r swsscommon $(GOPATH)/src/swsscommon
libcswsscommon:
cd libcswsscommon && sudo make install
clean:
rm -rf $(GOPATH)