Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Add more Makefile targets
Browse files Browse the repository at this point in the history
* binaries
  - gandalf-webserver
  - gandalf-ssh
* run-gandalf-webserver
* run-gandalf-ssh
  • Loading branch information
msabramo committed Jan 3, 2015
1 parent ccd329c commit 78d6a96
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/build
dist-*
Godeps/_workspace
Godeps/Readme
build/
27 changes: 24 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
get: get-code godep
BUILD_DIR = build
GANDALF_WEBSERVER_BIN = $(BUILD_DIR)/gandalf-webserver
GANDALF_WEBSERVER_SRC = webserver/main.go
GANDALF_SSH_BIN = $(BUILD_DIR)/gandalf-ssh
GANDALF_SSH_SRC = bin/gandalf.go

get: get-code godep binaries

get-code:
go get $(GO_EXTRAFLAGS) -u -d -t ./...
Expand All @@ -14,5 +20,20 @@ test: get-code
doc:
@cd docs && make html

run:
@godep go run webserver/main.go -config ./etc/gandalf.conf
binaries: gandalf-webserver gandalf-ssh

gandalf-webserver: $(GANDALF_WEBSERVER_BIN)

$(GANDALF_WEBSERVER_BIN):
godep go build -o $(GANDALF_WEBSERVER_BIN) $(GANDALF_WEBSERVER_SRC)

run-gandalf-webserver: $(GANDALF_WEBSERVER_BIN)
$(GANDALF_WEBSERVER_BIN) $(GANDALF_WEBSERVER_OPTIONS)

gandalf-ssh: $(GANDALF_SSH_BIN)

$(GANDALF_SSH_BIN):
godep go build -o $(GANDALF_SSH_BIN) $(GANDALF_SSH_SRC)

run-gandalf-ssh: $(GANDALF_SSH_BIN)
$(GANDALF_SSH_BIN) $(GANDALF_SSH_OPTIONS)

0 comments on commit 78d6a96

Please sign in to comment.