aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-12-20 00:24:59 +0000
committerbloodstalker <thabogre@gmail.com>2018-12-20 00:24:59 +0000
commitfa27c01c8666cb24821a0af3c58d6a23f8c54726 (patch)
treef3487fc8bd422932f42d0ec13dc9748ee8788608 /makefile
parenttravis badge (diff)
downloadcgrep-fa27c01c8666cb24821a0af3c58d6a23f8c54726.tar.gz
cgrep-fa27c01c8666cb24821a0af3c58d6a23f8c54726.zip
build uses pch now. kinda cool but our build time bottleneck seems to be linking
Diffstat (limited to 'makefile')
-rw-r--r--makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/makefile b/makefile
index 289d775..5ffe346 100644
--- a/makefile
+++ b/makefile
@@ -28,7 +28,8 @@ LLVM_CONF?=llvm-config
LLVM_CXX_FLAGS=$(shell $(LLVM_CONF) --cxxflags)
LLVM_CXX_FLAGS+=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include\
-I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\
- -stdlib=libstdc++ -std=c++17 -fexceptions
+ -std=c++17 -fexceptions
+#LLVM_LD_FLAGS=-Wl,--start-group $(shell $(LLVM_CONF) --libs) -Wl, --end-group
LLVM_LD_FLAGS=-Wl,--start-group -lclangAST -lclangAnalysis -lclangBasic\
-lclangDriver -lclangEdit -lclangFrontend -lclangFrontendTool\
-lclangLex -lclangParse -lclangSema -lclangEdit -lclangASTMatchers\
@@ -75,7 +76,7 @@ LD_FLAGS+=$(EXTRA_LD_FLAGS)
.PHONY:all clean help ASM SO TAGS
-all:$(TARGET)
+all: pch.hpp.gch $(TARGET)
everything:$(TARGET) A ASM SO $(TARGET)-dbg TAGS $(TARGET)-cov
@@ -89,8 +90,8 @@ depend:.depend
-include ./.depend
-.cpp.o:
- $(CXX) $(CXX_FLAGS) -c $< -o $@
+%.o:%.cpp
+ $(CXX) -include-pch pch.hpp.gch $(CXX_FLAGS) -c $< -o $@
%.odbg:%.cpp
$(CXX) $(CXX_FLAGS) -g -c $< -o $@
@@ -98,6 +99,9 @@ depend:.depend
%.ocov:%.cpp
$(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@
+pch.hpp.gch: pch.hpp
+ $(CXX) $(CXX_FLAGS) -c $< -o $@
+
./cfe-extra/cfe_extra.o:./cfe-extra/cfe_extra.cpp
$(CXX) $(CXX_FLAGS) -c $< -o $@
@@ -162,12 +166,13 @@ format:
- clang-format -i $(SRCS) $(HDRS)
clean:
- rm -f *.o *.dis *.odbg *.ocov *~ $(TARGET) $(TARGET).so $(TARGET)-static $(TARGET)-dbg $(TARGET).a $(TARGET)-cov ./keccak-tiny/*.o ./keccak-tiny/*.ocov ./keccak-tiny/*.odbg
+ rm -f *.o *.dis *.odbg *.ocov *~ $(TARGET) $(TARGET).so $(TARGET)-static $(TARGET)-dbg $(TARGET).a $(TARGET)-cov
deepclean: clean
- rm tags
- rm .depend
- $(MAKE) -C ./cfe-extra clean
+ - rm *.gch
help:
@echo "--all is the default target, runs $(TARGET) target"