From 6b23a5ac0d9019604dd0c7e785f607329a50f658 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 18 Feb 2014 12:38:29 -0800 Subject: [PATCH] Respect CXX env var in Makefile --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7c6c8152..6a752bbb 100644 --- a/Makefile +++ b/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 $<