snengame/Makefile
Steve eb7b405641 cards are now passed as PortableCard objects
client supports all actions
A bunch of stuff uses *Decks now instead of []Card since json marshaling
all of this code is absolutely awful
2021-07-23 16:43:39 -04:00

26 lines
798 B
Makefile

GAMEFILES=$(wildcard internal/game/*.go)
COORDFILEs=$(wildcard internal/coordinator/*.go)
#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
all: client server engine
client: $(GAMEFILES) $(wildcard cmd/client/*.go)
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./cmd/client
server: $(GAMEFILES) $(COORDFILEs) $(wildcard cmd/server/*.go)
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./cmd/server
engine: $(GAMEFILES)
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./cmd/engine
clean:
rm -f client server engine
run: engine
./engine
install: $(SNENGAME)
install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin