1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

makefile: Simpler build under MinGW. Detect attempt to build under Msys bash shell and issue error message

This commit is contained in:
Mark Pizzolato
2015-01-12 16:19:18 -08:00
parent 30d2db2abe
commit e0b69fa275
3 changed files with 13 additions and 4 deletions

View File

@@ -87,6 +87,17 @@ else
endif
find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip $(LIBPATH)),$(wildcard $(dir)/lib$(1).$(LIBEXT))))))
find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip $(INCPATH)),$(wildcard $(dir)/$(1).h)))))
ifneq ($(findstring Windows,$(OS)),)
ifeq ($(findstring .exe,$(SHELL))),.exe)
# MinGW
WIN32 := 1
else # Msys or cygwin
ifeq (MINGW,$(findstring MINGW,$(shell uname)))
$(info *** This makefile can not be used with the Msys bash shell)
$(error *** Use build_mingw.bat $(MAKECMDGOALS) from a Windows command prompt)
endif
endif
endif
ifeq ($(WIN32),) #*nix Environments (&& cygwin)
ifeq ($(GCC),)
ifeq (,$(shell which gcc 2>/dev/null))