Created
August 16, 2018 07:39
-
-
Save Leedehai/4e54c0366415d6bb0f5ebceeda82bc83 to your computer and use it in GitHub Desktop.
Makefile detect OS and select compiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
T_OPERERATING_SYSTEM := $(shell uname -s) | |
ifeq ($(T_OPERERATING_SYSTEM), Linux) | |
T_CXX := g++ | |
endif | |
ifeq ($(T_OPERERATING_SYSTEM), Darwin) # macOS | |
T_CXX := clang++ | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment