-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (32 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
NAME := reco-map-reduce
DESC := Prototype map reduce system on FPGAs
PREFIX ?= usr/local
VERSION := $(shell git describe --tags --always --dirty)
GOVERSION := $(shell go version)
BUILDTIME := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
BUILDDATE := $(shell date -u +"%B %d, %Y")
BUILDER := $(shell echo "`git config user.name` <`git config user.email`>")
PKG_RELEASE ?= 1
PKG_NAME = "github.com/ReconfigureIO/$(NAME)"
PROJECT_URL := "https://github.com/ReconfigureIO/$(NAME)"
LDFLAGS := -X 'main.version=$(VERSION)' \
-X 'main.buildTime=$(BUILDTIME)' \
-X 'main.builder=$(BUILDER)' \
-X 'main.goversion=$(GOVERSION)'
.PHONY: test all clean dependencies integration
all: dist/generate-framework
print-% : ; @echo $($*)
test: | dependencies
go test -v $$(go list ./... | grep -v /vendor/ | grep -v /cmd/)
integration: dist/generate-framework
find examples -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' -exec make -C {} all \;
clean:
find examples -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' -exec make -C {} clean \;
rm -rf dist
dependencies:
glide install
find examples -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' -exec make -C {} dependencies \;
dist:
mkdir -p dist
dist/generate-framework: cmd/generate-framework/main.go dependencies | dist
go build -o $@ $(PKG_NAME)/cmd/generate-framework