41 lines
931 B
Makefile
41 lines
931 B
Makefile
AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo
|
|
|
|
|
|
GOFLAGS= -v
|
|
bin_PROGRAMS = mstorectl
|
|
sbin_PROGRAMS = mstored
|
|
|
|
mstorectl_SOURCES = \
|
|
cmd/mstorectl/filecmd.go \
|
|
cmd/mstorectl/imagecmd.go \
|
|
cmd/mstorectl/main.go
|
|
|
|
mstored_SOURCES = \
|
|
cmd/mstored/main.go
|
|
|
|
mstorectl$(EXEEXT): $(mstorectl_SOURCES)
|
|
env CGO_ENABLED=0 $(GO) build $(GOFLAGS) -o mstorectl$(EXEEXT) $(mstorectl_SOURCES)
|
|
|
|
mstored$(EXEEXT): $(mstored_SOURCES)
|
|
env CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o mstored$(EXEEXT) $(mstored_SOURCES)
|
|
|
|
run: $(mstored_SOURCES)
|
|
cd cmd/mstored && env CGO_ENABLED=1 $(GO) run .
|
|
|
|
CWD=$(shell pwd)
|
|
|
|
format:
|
|
@dirs=$$($(FIND) $(CWD) -name '*.go' | $(XARGS) -n1 dirname | $(SORT) | $(UNIQ)); \
|
|
for dir in $$dirs;do \
|
|
(echo "====$$dir===="; cd $$dir && $(GO) fmt .); \
|
|
done
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
cd pkg/client && $(GO) test -v .
|
|
|
|
clean-local:
|
|
$(FIND) $(CWD) -name '*~' | $(XARGS) rm -f
|
|
rm -rf autom4te.cache
|