From 15ff0e08f2c53c39a62dc867d2542aec2894d274 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Mon, 25 Sep 2017 16:50:26 -0700 Subject: [PATCH] Makefile --- .gitignore | 1 + Makefile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index e69de29..567609b 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1608995 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +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) + +$(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