-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds really really simple build system
- Loading branch information
Chris Saunders
committed
Oct 21, 2014
1 parent
ed114f5
commit 2aca516
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
SUBPROJECTS = theme-manipulate theme-watch theme-configure | ||
|
||
all: deps | ||
for subproject in $(SUBPROJECTS); \ | ||
do \ | ||
mkdir -p build/development; \ | ||
go build -o build/development/$${subproject} cmd/$${subproject}/*; \ | ||
done | ||
|
||
build: | ||
for subproject in $(SUBPROJECTS); \ | ||
do \ | ||
mkdir -p build/dist/${GOOS}-${GOARCH}; \ | ||
go build -o build/dist/${GOOS}-${GOARCH}/$${subproject} cmd/$${subproject}/*; \ | ||
done | ||
|
||
deps: | ||
go get ./... | ||
|
||
clean: | ||
rm -rf build/ | ||
|
||
.PHONY: all build clean | ||
|
||
build64: | ||
export GOARCH=amd64; $(MAKE) build | ||
|
||
build32: | ||
export GOARCH=386; $(MAKE) build | ||
|
||
windows: | ||
export GOOS=windows; $(MAKE) build64 | ||
export GOOS=windows; $(MAKE) build32 | ||
|
||
mac: | ||
export GOOS=darwin; $(MAKE) build64 | ||
|
||
linux: | ||
export GOOS=linux; $(MAKE) build64 | ||
export GOOS=linux; $(MAKE) build32 | ||
|
||
dist: deps windows mac linux |