1 ## @file FindCompiler.mk
2 ## @brief find compiler under various platform, determine CXX, CC, FC, AR
4 ## Use following command in the Makefile to view the results
6 ## $(info Compilers: CC = $(CC), CXX = $(CXX), FC = $(FC), AR = $(AR))
11 ## @param LIMBO_DIR, LIMBO_ROOT_DIR given LIMBO_DIR or LIMBO_ROOT_DIR
12 ## @param CC, CXX, FC, AR set CC as c compiler, CXX as c++ compiler, FC as fortran compiler, AR as archiver
17 UNAME_S = $(shell uname -s)
19 # consider two cases, called when building Limbo library or called from other programs
22 LIMBO_ROOT_DIR = $(LIMBO_DIR)/include
24 $(error LIMBO_ROOT_DIR = $(LIMBO_ROOT_DIR), LIMBO_DIR = $(LIMBO_DIR))
28 # ==== search compilers under Linux
29 ifeq ($(UNAME_S), Linux)
30 #FOUNDCC = $(shell find ${PATH
32 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindGcc.mk
33 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindGxx.mk
34 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindGfortran.mk
35 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindAR.mk
39 # ==== search for compilers under Darwin
40 ifeq ($(UNAME_S), Darwin)
42 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindClang.mk
43 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindClangxx.mk
44 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindGfortran.mk
45 include $(LIMBO_ROOT_DIR)/
limbo/makeutils/FindAR.mk