Breaking Makefile into platform specific files
Fixed #1270 Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
This commit is contained in:
19
Makefile.OS
Normal file
19
Makefile.OS
Normal file
@@ -0,0 +1,19 @@
|
||||
#Detect the OS, and return installos value same as GOOS
|
||||
target_os =
|
||||
ifeq ($(OS),Windows_NT)
|
||||
target_os = windows
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
target_os = linux
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
target_os = darwin
|
||||
endif
|
||||
ifeq ($(UNAME_S),FreeBSD)
|
||||
target_os = freebsd
|
||||
endif
|
||||
ifeq ($(UNAME_S),SunOS)
|
||||
target_os = solaris
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user