123456789101112131415161718 |
- all_hosts = Skeleton Linux FreeBSD
- ifeq ($(OS),)
- SYS := $(shell gcc -dumpmachine)
- ifeq ($(SYS),x86_64-linux-gnu)
- OS := Linux
- else ifeq ($(findstring freebsd,$(SYS)),freebsd)
- OS := FreeBSD
- else
- $(error Unsupported platform: $(SYS))
- endif
- else
- ifeq ($(findstring $(OS),$(all_hosts)),)
- $(error Unsupported platform: $(OS))
- endif
- endif
- OS_MACRO := $(shell echo $(OS) | tr '[:lower:]' '[:upper:]')
|