1################################################################################ 2# \file host.mk 3# \version 1.0 4# 5# \brief 6# Makefile to describe host environment for Cypress MCUBoot based applications. 7# 8################################################################################ 9# \copyright 10# Copyright 2018-2021 Cypress Semiconductor Corporation 11# SPDX-License-Identifier: Apache-2.0 12# 13# Licensed under the Apache License, Version 2.0 (the "License"); 14# you may not use this file except in compliance with the License. 15# You may obtain a copy of the License at 16# 17# http://www.apache.org/licenses/LICENSE-2.0 18# 19# Unless required by applicable law or agreed to in writing, software 20# distributed under the License is distributed on an "AS IS" BASIS, 21# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22# See the License for the specific language governing permissions and 23# limitations under the License. 24################################################################################ 25 26# Detect host OS to make resolving compiler pathes easier 27UNAME_S := $(shell uname -s) 28ifeq ($(UNAME_S), Darwin) 29 HOST_OS = osx 30else 31 ifeq ($(UNAME_S), Linux) 32 HOST_OS = linux 33 else 34 HOST_OS = win 35 endif 36endif 37 38ifeq ($(HOST_OS), win) 39 define get_os_path 40$(shell cygpath -m $(1)) 41 endef 42else 43 define get_os_path 44$(1) 45 endef 46endif 47 48PRJ_DIR=$(call get_os_path, $(CURDIR)) 49