Respect CXX env var in Makefile
This commit is contained in:
parent
741da7b5ae
commit
6b23a5ac0d
1 changed files with 4 additions and 4 deletions
8
Makefile
8
Makefile
|
|
@ -1,8 +1,8 @@
|
|||
.PHONY: all clean test debug valgrind
|
||||
|
||||
### install configuration ###
|
||||
CPP = c++
|
||||
CC = cc
|
||||
CXX ?= clang++
|
||||
CC ?= clang
|
||||
RM ?= rm -f
|
||||
MKDIR ?= $(INSTALL) -d
|
||||
SYMLINK ?= ln -s
|
||||
|
|
@ -28,13 +28,13 @@ all: $(LIB_FILE)
|
|||
$(CC) $(CFLAGS) -Iinclude -Isrc/runtime -c $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
$(CPP) $(CPPFLAGS) -Iinclude -Isrc/compiler -Isrc/runtime -Iexternals/bandit -Ispec -c $< -o $@
|
||||
$(CXX) $(CPPFLAGS) -Iinclude -Isrc/compiler -Isrc/runtime -Iexternals/bandit -Ispec -c $< -o $@
|
||||
|
||||
test: $(TEST_BIN)
|
||||
./$<
|
||||
|
||||
$(TEST_BIN): $(TEST_OBJECTS) $(SRC_OBJECTS)
|
||||
$(CPP) $(CPPFLAGS) $(TEST_OBJECTS) $(SRC_OBJECTS) -o $@
|
||||
$(CXX) $(CPPFLAGS) $(TEST_OBJECTS) $(SRC_OBJECTS) -o $@
|
||||
|
||||
debug: $(TEST_BIN)
|
||||
gdb $<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue