We can now get the serve address
This commit is contained in:
6
Makefile
6
Makefile
@ -1,9 +1,9 @@
|
||||
BUILD_MODE ?= DEBUG
|
||||
|
||||
ifeq ($(BUILD_MODE),DEBUG)
|
||||
LISTEN_PORT = ":9090"
|
||||
LISTEN_ADDR = "localhost:9090"
|
||||
else ifeq ($(BUILD_MODE),RELEASE)
|
||||
LISTEN_PORT = ":80"
|
||||
LISTEN_ADDR = "0.0.0.0:80"
|
||||
else
|
||||
$(error Unknown build mode)
|
||||
endif
|
||||
@ -11,7 +11,7 @@ endif
|
||||
all: lts watcher
|
||||
|
||||
lts: lts.go uuid.go
|
||||
go build -ldflags="-X main.LISTEN_PORT=$(LISTEN_PORT)"
|
||||
go build -ldflags="-X main.LISTEN_ADDR=$(LISTEN_ADDR)"
|
||||
|
||||
watcher: watcher.c
|
||||
cc -o $@ $<
|
||||
|
Reference in New Issue
Block a user