Closed jeffreyscottgraham closed 9 years ago
Here is a patch (it also sets CC and CFLAGS only if not already set, since some of us do not use clang)
--- Makefile +++ Makefile @@ -1,8 +1,8 @@
-#CC = clang++
-#CFLAGS = llvm-config --ldflags
-O3 -Wall -pedantic
+CC ?= clang++
+CFLAGS ?= llvm-config --ldflags
-O3 -Wall -pedantic
@@ -29,7 +29,7 @@ PATH_SAMPLE = ./sample
-all: example +all: $(PATH_OBJ) $(PATH_BIN) example
new: clean example
@@ -76,3 +76,7 @@
new:
$(MAKE) clean
$(MAKE) all
+
+$(PATH_OBJ) $(PATH_BIN):
+1, I had to create bin and obj and use CC=c++ as clang++ didn't exist. I also had to add -std=c++11 to CFLAGS as GCC warned: ./sample/example.cpp:360:120: warning: ISO C++98 does not support the '%lf' gnu_printf format
The issue is now fixed in the current head revision (although i just added the folders to the repository)
The compile fails because the two directories 'obj' and 'bin' are assumed to exist