MAKEFILE: Added support to attempt to use the OS provided cc if gcc isn't available or otherwise specified by GCC= on the make command line.

This commit is contained in:
Mark Pizzolato 2014-08-02 18:53:44 -07:00
parent 89ca7bda3b
commit 1458712547

View file

@ -77,8 +77,14 @@ else
endif endif
ifeq ($(WIN32),) #*nix Environments (&& cygwin) ifeq ($(WIN32),) #*nix Environments (&& cygwin)
ifeq ($(GCC),) ifeq ($(GCC),)
ifneq (has-gcc,$(shell if which -s gcc; then echo has-gcc; fi))
$(info *** Warning *** Using local cc since gcc isn't available locally.)
$(info *** Warning *** You may need to install gcc to build working simulators.)
GCC = cc
else
GCC = gcc GCC = gcc
endif endif
endif
OSTYPE = $(shell uname) OSTYPE = $(shell uname)
# OSNAME is used in messages to indicate the source of libpcap components # OSNAME is used in messages to indicate the source of libpcap components
OSNAME = $(OSTYPE) OSNAME = $(OSTYPE)