After reading this question, I wrote a Makefile that starts with
CXX=g++
CXXFLAGS= -std=c++17 -Wall -O3 -g
ifeq ( $( shell uname ), "Linux" )
CXXFLAGS += -fopenmp
endif
LIBS= -pthread
INCLUDES = -I.
TARGETS= my targets...
I need to pass the -fopenmp
flag only if I'm compiling on linux and not when I'm compiling on Mac.
My problem is that this don't work and the flag never get passed.