Issue with foreach statement

2016-07-25 Thread Lee Shallis
I don't know whether this is because of the way I used foreach or whether it is because of the way I used gcc so I'm going to start with the snippet involving my foreach statement: CODIT_SRC:=$(sort $(notdir $(wildcard $(CODIT__SRC_DIR)*.c))) > CODIT_OBJ:=$(CODIT_SRC:.c=.o) > CODIT_DEP:=$(CODIT_SR

Why CXX defaults to g++ instead of c++?

2016-07-25 Thread Lei Zhang
Hi, I'm trying to replace gcc with clang as the default compiler in my system. Ideally I just link cc/c++ to clang, and gcc can still be kept in case it's needed. However, somehow `make` defaults CC to cc, but CXX to g++ instead of c++, so my solution doesn't work with C++ files. I'm curious why