2019-03-24 23:51:39 +01:00
|
|
|
TAGS=
|
|
|
|
|
2019-03-25 04:43:30 +01:00
|
|
|
.PHONY: fmt vet get clean dev setdev test
|
2019-03-10 16:42:12 +01:00
|
|
|
|
2019-04-04 17:19:57 +02:00
|
|
|
all: fmt vet test MovieNight MovieNight.exe static/main.wasm settings.json
|
2019-03-10 16:42:12 +01:00
|
|
|
|
2019-03-24 23:51:39 +01:00
|
|
|
setdev:
|
|
|
|
$(eval export TAGS=-tags "dev")
|
|
|
|
|
|
|
|
dev: setdev all
|
|
|
|
|
2019-03-13 06:09:24 +01:00
|
|
|
MovieNight.exe: *.go common/*.go
|
2019-03-24 23:51:39 +01:00
|
|
|
GOOS=windows GOARCH=amd64 go build -o MovieNight.exe $(TAGS)
|
2019-03-10 16:42:12 +01:00
|
|
|
|
2019-03-13 06:09:24 +01:00
|
|
|
MovieNight: *.go common/*.go
|
2019-03-24 23:51:39 +01:00
|
|
|
GOOS=linux GOARCH=386 go build -o MovieNight $(TAGS)
|
2019-03-10 16:42:12 +01:00
|
|
|
|
2019-03-13 06:09:24 +01:00
|
|
|
static/main.wasm: wasm/*.go common/*.go
|
2019-03-24 23:51:39 +01:00
|
|
|
GOOS=js GOARCH=wasm go build -o ./static/main.wasm $(TAGS) wasm/*.go
|
2019-03-12 04:15:42 +01:00
|
|
|
|
2019-03-10 16:42:12 +01:00
|
|
|
clean:
|
2019-03-12 23:15:45 +01:00
|
|
|
-rm MovieNight.exe MovieNight ./static/main.wasm
|
2019-03-10 16:42:12 +01:00
|
|
|
|
|
|
|
fmt:
|
2019-06-19 00:46:35 +02:00
|
|
|
gofmt -w .
|
2019-03-10 16:42:12 +01:00
|
|
|
|
|
|
|
vet:
|
2019-03-24 23:51:39 +01:00
|
|
|
go vet $(TAGS) ./...
|
|
|
|
GOOS=js GOARCH=wasm go vet $(TAGS) ./...
|
2019-03-25 04:43:30 +01:00
|
|
|
|
|
|
|
test:
|
2019-04-04 17:04:18 +02:00
|
|
|
go test $(TAGS) ./...
|
2019-04-04 17:19:57 +02:00
|
|
|
|
|
|
|
# Do not put settings_example.json here as a prereq to avoid overwriting
|
|
|
|
# the settings if the example is updated.
|
|
|
|
settings.json:
|
|
|
|
cp settings_example.json settings.json
|