Add a Makefile.
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2016 18:59:18 +0000 (14:59 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2016 18:59:18 +0000 (14:59 -0400)
Makefile [new file with mode: 0644]
test.cc

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..12299a2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+CXX := clang++
+CXXFLAGS := -g -std=c++11
+
+all: test-zc test-tr
+
+test-zc: test.cc
+       $(CXX) $(CXXFLAGS) $< -o $@
+
+test-tr: test.cc
+       $(CXX) -DZCPOINTER_TRACK_REFS=1 $(CXXFLAGS) $< -o $@
+
+clean:
+       rm -rf test-zc test-tr *.dSYM
diff --git a/test.cc b/test.cc
index 3c1e152..92da993 100644 (file)
--- a/test.cc
+++ b/test.cc
@@ -14,8 +14,6 @@
 
 #include <iostream>
 
-#define ZCPOINTER_TRACK_REFS 1
-
 #include "zcpointer.h"
 
 class C {