aboutsummaryrefslogtreecommitdiffstats
path: root/dwasm-cpp/makefile
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-06-29 18:31:09 +0000
committerbloodstalker <thabogre@gmail.com>2018-06-29 18:31:09 +0000
commitdd572c60f7d89912bb035714b997a0f81e94d435 (patch)
treef9e791c8b32d1d528ba9255d4b642821aee41685 /dwasm-cpp/makefile
parentupdate (diff)
downloaddwasm-dd572c60f7d89912bb035714b997a0f81e94d435.tar.gz
dwasm-dd572c60f7d89912bb035714b997a0f81e94d435.zip
update
Diffstat (limited to 'dwasm-cpp/makefile')
-rw-r--r--dwasm-cpp/makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/dwasm-cpp/makefile b/dwasm-cpp/makefile
new file mode 100644
index 0000000..d55d6ee
--- /dev/null
+++ b/dwasm-cpp/makefile
@@ -0,0 +1,46 @@
+TARGET=dwasm
+CXX=clang++
+CXX?=clang++
+CXX_FLAGS=-std=c++11
+CXX_EXTRA?=
+CXX_FLAGS+=$(CXX_EXTRA)
+LD_FLAGS=
+EXTRA_LD_FLAGS?=
+LD_FLAGS+=$(EXTRA_LD_FLAGS)
+ADD_SANITIZERS_CC= -g -fsanitize=address -fno-omit-frame-pointer
+ADD_SANITIZERS_LD= -g -fsanitize=address
+MEM_SANITIZERS_CC= -g -fsanitize=memory -fno-omit-frame-pointer
+MEM_SANITIZERS_LD= -g -fsanitize=memory
+UB_SANITIZERS_CC= -g -fsanitize=undefined -fno-omit-frame-pointer
+UB_SANITIZERS_LD= -g -fsanitize=undefined
+BUILD_MODE?=COV_NO_CLANG_1Z
+
+SRCS=$(wildcard *.cpp)
+
+.DEFAULT:all
+
+.PHONY:all clean help
+
+all:$(TARGET)
+
+depend:.depend
+
+.depend:$(SRCS)
+ rm -rf .depend
+ $(CXX) -MM $(CXX_FLAGS) $^ > ./.depend
+
+-include ./.depend
+
+.cpp.o:
+ $(CXX) $(CXX_FLAGS) -c $< -o $@
+
+$(TARGET): $(TARGET).o
+ $(CXX) $^ $(LD_FLAGS) -o $@
+
+clean:
+ rm -f *.o *~ $(TARGET)
+ rm .depend
+
+help:
+ @echo "all is the default target"
+ @echo "there is clean."