This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
tacitus/Makefile
2017-09-25 17:11:16 -07:00

53 lines
1.4 KiB
Makefile

FMTFLAGS = -l -w -s
BUILD_DIR = build
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)
fmt: $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) $(OPS_FILES) \
$(GDAX_FILES) $(GDAX_WEBSOCKET_FILES) $(HTTP_FILES)
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)
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)
$(WEBAPP):
go build -o $(WEBAPP) cmd/webapp/main.go
$(WATCHER): $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) \
$(GDAX_FILES) $(GDAX_WEBSOCKET_FILES)
go build -o $(WATCHER) cmd/watcher/main.go
clean:
-rm -f $(BUILD_DIR)/*
.PHONEY: clean webapp watcher fmt