Initial commit
This commit is contained in:
44
Makefile
Normal file
44
Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env gmake -f
|
||||
|
||||
BUILDOPTS=-ldflags="-s -w" -a -gcflags=all=-l -trimpath
|
||||
FILELIST=collection.go types.go globals.go lib.go event_parser.go commands.go redis.go settings-db-util.go main.go
|
||||
BINARY=aleesa-jabber-go
|
||||
|
||||
all: clean build
|
||||
|
||||
build:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# powershell
|
||||
ifeq ($(SHELL),sh.exe)
|
||||
SET CGO_ENABLED=0
|
||||
go build ${BUILDOPTS} -o ${BINARY} ${FILELIST}
|
||||
else
|
||||
# jetbrains golang
|
||||
CGO_ENABLED=0
|
||||
go build ${BUILDOPTS} -o ${BINARY} ${FILELIST}
|
||||
endif
|
||||
# bash/git bash
|
||||
else
|
||||
CGO_ENABLED=0 go build ${BUILDOPTS} -o ${BINARY} ${FILELIST}
|
||||
endif
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
||||
upgrade:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# jetbrains golang, powershell
|
||||
ifeq ($(SHELL),sh.exe)
|
||||
if exist vendor del /F /S /Q vendor >nul
|
||||
# git bash case
|
||||
else
|
||||
$(RM) -r vendor
|
||||
endif
|
||||
else
|
||||
$(RM) -r vendor
|
||||
endif
|
||||
go get -d -u -t ./...
|
||||
go mod tidy
|
||||
go mod vendor
|
||||
|
||||
# vim: set ft=make noet ai ts=4 sw=4 sts=4:
|
||||
Reference in New Issue
Block a user