Skip to content

Instantly share code, notes, and snippets.

@Leedehai
Created August 16, 2018 07:39
Show Gist options
  • Save Leedehai/4e54c0366415d6bb0f5ebceeda82bc83 to your computer and use it in GitHub Desktop.
Save Leedehai/4e54c0366415d6bb0f5ebceeda82bc83 to your computer and use it in GitHub Desktop.
Makefile detect OS and select compiler
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