about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-28 23:52:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-28 23:52:07 -0700
commitc5d5431990361c921dc850d078d85a797d219e06 (patch)
treea1a61461c1dd8b8ed7751dcec27dd075af44f04e
parent4e39c6bb082d6f7c0aaab9767b9b279490bce290 (diff)
downloadmu-c5d5431990361c921dc850d078d85a797d219e06.tar.gz
3275
Follow convention more closely by using CXXFLAGS for C++ files.
-rwxr-xr-xbuild_until2
-rw-r--r--makefile6
-rwxr-xr-xmu4
-rwxr-xr-xtest_layers2
4 files changed, 7 insertions, 7 deletions
diff --git a/build_until b/build_until
index 42d44bc7..77c217dd 100755
--- a/build_until
+++ b/build_until
@@ -12,4 +12,4 @@ make --no-print-directory autogenerated_lists
 
 cat /dev/null $(./enumerate/enumerate --until $1 |grep '.mu$') > core.mu
 
-CFLAGS=${CFLAGS:-"-g -O3"} make
+CXXFLAGS=${CXXFLAGS:-"-g -O3"} make
diff --git a/makefile b/makefile
index 66b92ba9..af4dfe81 100644
--- a/makefile
+++ b/makefile
@@ -1,12 +1,12 @@
 all: mu_bin core.mu
 
 CXX ?= c++
-CFLAGS ?= -g -O3
+CXXFLAGS ?= -g -O3
 # reduce memory usage for small servers
-CFLAGS := ${CFLAGS} --param ggc-min-expand=1 --param ggc-min-heapsize=32768
+CXXFLAGS := ${CXXFLAGS} --param ggc-min-expand=1 --param ggc-min-heapsize=32768
 
 mu_bin: makefile mu.cc termbox/libtermbox.a
-	${CXX} ${CFLAGS} -Wall -Wextra -ftrapv -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin
+	${CXX} ${CXXFLAGS} -Wall -Wextra -ftrapv -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin
 
 # To see what the program looks like after all layers have been applied, read
 # mu.cc
diff --git a/mu b/mu
index 71827c49..409a0997 100755
--- a/mu
+++ b/mu
@@ -9,7 +9,7 @@ make -q || make >&2 || exit 1
 # disabling optimizations. In that case don't run all tests if I load any app
 # files.
 # Might be too clever..
-if [[ $CFLAGS && $# -gt 0 && $1 != '--help' ]]  # latter two conditions are to continue printing the help message
+if [[ $CXXFLAGS && $# -gt 0 && $1 != '--help' ]]  # latter two conditions are to continue printing the help message
 then
   ./mu_bin --test-only-app "$@"
   exit 1
@@ -22,4 +22,4 @@ fi
 #   mu --help
 #   mu test
 #   mu test file1.mu
-#   CFLAGS=-g mu test file1.mu  # run only tests in file1.mu
+#   CXXFLAGS=-g mu test file1.mu  # run only tests in file1.mu
diff --git a/test_layers b/test_layers
index 1910a5d7..8b550ebd 100755
--- a/test_layers
+++ b/test_layers
@@ -32,7 +32,7 @@ do
 done
 
 # Layers for Mu apps without Valgrind
-CXX=clang++ CFLAGS="-O3 -fsanitize=undefined -Wno-tautological-constant-out-of-range-compare" make
+CXX=clang++ CXXFLAGS="-O3 -fsanitize=undefined -Wno-tautological-constant-out-of-range-compare" make
 
 if [[ ! $1 || $1 == chessboard ]]
 then