2017-09-25 17:11:16 -07:00
|
|
|
FMTFLAGS = -l -w -s
|
2017-09-25 16:50:26 -07:00
|
|
|
BUILD_DIR = build
|
|
|
|
|
2017-09-26 22:58:49 -07:00
|
|
|
WATCHER_FILES = $(wildcard cmd/watcher/*.go)
|
2017-09-27 19:58:35 -07:00
|
|
|
WEBAPP_FILES = $(wildcard cmd/webapp/*.go)
|
2017-09-26 22:58:49 -07:00
|
|
|
|
2017-09-25 16:50:26 -07:00
|
|
|
TACITUS_FILES = $(wildcard *.go)
|
|
|
|
GDAX_FILES = $(wildcard gdax/*.go)
|
|
|
|
GDAX_WEBSOCKET_FILES = $(wildcard gdax/websocket/*.go)
|
|
|
|
HTTP_FILES = $(wildcard http/*.go)
|
|
|
|
OPS_FILES = $(wildcard ops/*.go)
|
|
|
|
OSUTIL_FILES = $(wildcard osutil/*.go)
|
|
|
|
POSTGRES_FILES = $(wildcard postgres/*.go)
|
|
|
|
|
|
|
|
WATCHER = $(BUILD_DIR)/tacitus-watcher
|
|
|
|
WEBAPP = $(BUILD_DIR)/tacitus-webapp
|
|
|
|
|
|
|
|
all: watcher webapp
|
|
|
|
|
|
|
|
watcher: $(WATCHER)
|
|
|
|
|
|
|
|
webapp: $(WEBAPP)
|
|
|
|
|
2017-09-25 16:56:43 -07:00
|
|
|
fmt: $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) $(OPS_FILES) \
|
|
|
|
$(GDAX_FILES) $(GDAX_WEBSOCKET_FILES) $(HTTP_FILES)
|
2017-09-25 17:11:16 -07:00
|
|
|
gofmt $(FMTFLAGS) $(TACITUS_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(OSUTIL_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(POSTGRES_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(OPS_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(GDAX_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(GDAX_WEBSOCKET_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(HTTP_FILES)
|
2017-09-27 19:58:35 -07:00
|
|
|
gofmt $(FMTFLAGS) $(WATCHER_FILES)
|
|
|
|
gofmt $(FMTFLAGS) $(WEBAPP_FILES)
|
2017-09-25 17:11:16 -07:00
|
|
|
|
|
|
|
vet: $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) $(OPS_FILES) \
|
|
|
|
$(GDAX_FILES) $(GDAX_WEBSOCKET_FILES) $(HTTP_FILES)
|
|
|
|
go tool vet $(TACITUS_FILES)
|
|
|
|
go tool vet $(OSUTIL_FILES)
|
|
|
|
go tool vet $(POSTGRES_FILES)
|
|
|
|
go tool vet $(OPS_FILES)
|
|
|
|
go tool vet $(GDAX_FILES)
|
|
|
|
go tool vet $(GDAX_WEBSOCKET_FILES)
|
|
|
|
go tool vet $(HTTP_FILES)
|
2017-09-27 19:58:35 -07:00
|
|
|
go tool vet $(WATCHER_FILES)
|
|
|
|
go tool vet $(WEBAPP_FILES)
|
2017-09-25 16:56:43 -07:00
|
|
|
|
|
|
|
|
2017-09-26 22:58:49 -07:00
|
|
|
$(WEBAPP): $(WEBAPP_FILES) $(HTTP_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES)
|
2017-09-25 16:50:26 -07:00
|
|
|
go build -o $(WEBAPP) cmd/webapp/main.go
|
|
|
|
|
2017-10-08 11:19:11 -07:00
|
|
|
$(WATCHER): $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) $(GDAX_FILES) \
|
|
|
|
$(GDAX_WEBSOCKET_FILES) $(WATCHER_FILES) $(OPS_FILES)
|
2017-09-26 22:58:49 -07:00
|
|
|
go build -o $(WATCHER) $(WATCHER_FILES)
|
2017-09-25 16:50:26 -07:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f $(BUILD_DIR)/*
|
|
|
|
|
2017-09-26 22:58:49 -07:00
|
|
|
.PHONEY: all clean webapp watcher fmt
|