From 64e37df7332cf8cc7530826f2cb367ce8d738c61 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 9 Nov 2018 15:54:19 +0330 Subject: update --- .gitmodules | 3 +++ cfe-extra | 1 + cgrep.cpp | 1 + makefile | 22 ++++++++++++++++------ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 160000 cfe-extra diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d456833 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cfe-extra"] + path = cfe-extra + url = https://github.com/bloodstalker/cfe-extra diff --git a/cfe-extra b/cfe-extra new file mode 160000 index 0000000..0d705a3 --- /dev/null +++ b/cfe-extra @@ -0,0 +1 @@ +Subproject commit 0d705a39d07eed0392181c2ba49ac2d10eef17e9 diff --git a/cgrep.cpp b/cgrep.cpp index 4f66876..615d435 100644 --- a/cgrep.cpp +++ b/cgrep.cpp @@ -8,6 +8,7 @@ /*************************************************************************************************/ /*included modules*/ /*project headers*/ +#include "./cfe-extra/cfe_extra.h" /*standard headers*/ #include #include diff --git a/makefile b/makefile index 019f91f..2fad74a 100644 --- a/makefile +++ b/makefile @@ -98,16 +98,25 @@ depend:.depend %.ocov:%.cpp $(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@ -$(TARGET): $(TARGET).o +./cfe-extra/cfe_extra.o:./cfe-extra/cfe_extra.cpp + $(CXX) $(CXX_FLAGS) -c $< -o $@ + +./cfe-extra/cfe_extra.odbg:./cfe-extra/cfe_extra.cpp + $(CXX) $(CXX_FLAGS) -g -c $< -o $@ + +./cfe-extra/cfe_extra.ocov:./cfe-extra/cfe_extra.cpp + $(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@ + +$(TARGET): $(TARGET).o ./cfe-extra/cfe_extra.o $(CXX) $^ $(LD_FLAGS) -o $@ -$(TARGET)-static: $(TARGET).o +$(TARGET)-static: $(TARGET).o ./cfe-extra/cfe_extra.o $(CXX) $^ $(LD_FLAGS) -static -o $@ -$(TARGET)-dbg: $(TARGET).odbg +$(TARGET)-dbg: $(TARGET).odbg ./cfe-extra/cfe_extra.odbg $(CXX) $^ $(LD_FLAGS) -g -o $@ -$(TARGET)-cov: $(TARGET).ocov +$(TARGET)-cov: $(TARGET).ocov ./cfe-extra/cfe_extra.ocov $(CXX) $^ $(LD_FLAGS) $(COV_LD) -o $@ cov: runcov @@ -134,10 +143,10 @@ tags:$(SRCS) %.dis: %.o objdump -r -d -M intel -S $< > $@ -$(TARGET).so: $(TARGET).o +$(TARGET).so: $(TARGET).o ./cfe-extra/cfe_extra.o $(CXX) $^ $(LD_FLAGS) -shared -o $@ -$(TARGET).a: $(TARGET).o +$(TARGET).a: $(TARGET).o ./cfe-extra/cfe_extra.o ar rcs $(TARGET).a $(TARGET).o runcov: $(TARGET)-cov @@ -158,6 +167,7 @@ clean: deepclean: clean - rm tags - rm .depend + - $(MAKE) -C ./cfe-extra clean help: @echo "--all is the default target, runs $(TARGET) target" -- cgit v1.2.3