FMTFLAGS = -l -w -s GETFLAGS = -u BUILD_DIR = build WATCHER_FILES = $(wildcard cmd/watcher/*.go) WEBAPP_FILES = $(wildcard cmd/webapp/*.go) 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) get: go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/cmd/interval go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/cmd/watcher go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/cmd/webapp go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/gdax go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/gdax/websocket go get $(GETFLAGS) git.kevincotugno.com/kcotugno/tacitus/postgres 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) gofmt $(FMTFLAGS) $(WATCHER_FILES) gofmt $(FMTFLAGS) $(WEBAPP_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) go tool vet $(WATCHER_FILES) go tool vet $(WEBAPP_FILES) $(WEBAPP): $(WEBAPP_FILES) $(HTTP_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) go build -o $(WEBAPP) cmd/webapp/main.go $(WATCHER): $(TACITUS_FILES) $(OSUTIL_FILES) $(POSTGRES_FILES) $(GDAX_FILES) \ $(GDAX_WEBSOCKET_FILES) $(WATCHER_FILES) $(OPS_FILES) go build -o $(WATCHER) $(WATCHER_FILES) clean: -rm -f $(BUILD_DIR)/* .PHONEY: all clean webapp watcher fmt get