add makefile, shuffle properly, more card fixes
This commit is contained in:
parent
b37cc0e73c
commit
8062c99ee6
19
Makefile
Normal file
19
Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
GOFILES=$(wildcard *.go)
|
||||
PROG=snengame
|
||||
#set variables
|
||||
GIT_COMMIT := $(shell git rev-list -1 HEAD)
|
||||
ifeq ($(PREFIX),) # PREFIX is environment variable, but if it is not set, then set default value
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
|
||||
$(PROG): $(GOFILES)
|
||||
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)"
|
||||
|
||||
clean:
|
||||
rm -f snengame
|
||||
run: snengame
|
||||
./snengame
|
||||
install: $(SNENGAME)
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin
|
||||
|
Loading…
Reference in New Issue
Block a user