Revision 8a8787a8d693dce6d18163797b66b05457ae5a1e authored by aarshkshah1992 on 03 February 2021, 04:52:20 UTC, committed by aarshkshah1992 on 03 February 2021, 04:52:20 UTC
1 parent ec44522
Raw File
util.mk
# util functions
OS ?= $(shell sh -c 'uname -s 2>/dev/null || echo not')
ifeq ($(OS),Windows_NT)
	WINDOWS :=1
	?exe :=.exe # windows compat
	PATH_SEP :=;
else
	?exe :=
	PATH_SEP :=:
endif

SUPPORTED_PLATFORMS += windows-386
SUPPORTED_PLATFORMS += windows-amd64

SUPPORTED_PLATFORMS += linux-arm
SUPPORTED_PLATFORMS += linux-arm64
SUPPORTED_PLATFORMS += linux-386
SUPPORTED_PLATFORMS += linux-amd64

SUPPORTED_PLATFORMS += darwin-386
SUPPORTED_PLATFORMS += darwin-amd64

SUPPORTED_PLATFORMS += freebsd-386
SUPPORTED_PLATFORMS += freebsd-amd64

SUPPORTED_PLATFORMS += openbsd-386
SUPPORTED_PLATFORMS += openbsd-amd64

SUPPORTED_PLATFORMS += netbsd-386
SUPPORTED_PLATFORMS += netbsd-amd64

space:=
space+=
comma:=,
join-with=$(subst $(space),$1,$(strip $2))

# debug target, prints variable. Example: `make print-GOFLAGS`
print-%:
	@echo $*=$($*)

# phony target that will mean that recipe is always executed
ALWAYS:
.PHONY: ALWAYS
back to top