mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add flags to build prometheus statically
Change-Id: I8fc883247e0657d26aa8ca6f24315fb9217277f3
This commit is contained in:
parent
aaaf3367d6
commit
0e9e3e068d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,6 +9,7 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
*.rej
|
*.rej
|
||||||
*.so
|
*.so
|
||||||
|
*.tar.gz
|
||||||
*~
|
*~
|
||||||
.*.swp
|
.*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -34,6 +34,11 @@ build: config dependencies model preparation tools web
|
||||||
docker: build
|
docker: build
|
||||||
docker build -t prometheus:$(REV) .
|
docker build -t prometheus:$(REV) .
|
||||||
|
|
||||||
|
tarball: build prometheus-$(REV).tar.gz
|
||||||
|
|
||||||
|
prometheus-$(REV).tar.gz:
|
||||||
|
tar -czf prometheus-$(REV).tar.gz prometheus
|
||||||
|
|
||||||
$(BUILD_PATH)/cache/$(GOPKG):
|
$(BUILD_PATH)/cache/$(GOPKG):
|
||||||
curl -o $@ http://go.googlecode.com/files/$(GOPKG)
|
curl -o $@ http://go.googlecode.com/files/$(GOPKG)
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,9 @@ BUILDFLAGS := -ldflags \
|
||||||
-X main.goVersion $(GO_VERSION)\
|
-X main.goVersion $(GO_VERSION)\
|
||||||
-X main.leveldbVersion $(LEVELDB_VERSION)\
|
-X main.leveldbVersion $(LEVELDB_VERSION)\
|
||||||
-X main.protobufVersion $(PROTOCOL_BUFFERS_VERSION)\
|
-X main.protobufVersion $(PROTOCOL_BUFFERS_VERSION)\
|
||||||
-X main.snappyVersion $(SNAPPY_VERSION)"
|
-X main.snappyVersion $(SNAPPY_VERSION)\
|
||||||
|
-linkmode external\
|
||||||
|
-extldflags '-lstdc++ -lpthread -static\
|
||||||
|
$(PREFIX)/lib/libleveldb.a $(PREFIX)/lib/libsnappy.a'"
|
||||||
|
|
||||||
PROTOC := $(LOCAL_BINARIES)/protoc
|
PROTOC := $(LOCAL_BINARIES)/protoc
|
||||||
|
|
Loading…
Reference in a new issue