Skip to content

Commit

Permalink
Adds really really simple build system
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Saunders committed Oct 21, 2014
1 parent ed114f5 commit 2aca516
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
42 changes: 42 additions & 0 deletions Makefile
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

0 comments on commit 2aca516

Please sign in to comment.