diff --git a/Makefile b/Makefile index 5ac826cd..16c146a0 100644 --- a/Makefile +++ b/Makefile @@ -195,6 +195,9 @@ covtest: utest: $(MAKE) -C utest BOXES_PLATFORM=unix utest +debugutest: + $(MAKE) -C utest BOXES_PLATFORM=unix debugutest + win32.utest: $(OUT_DIR) cp $(WIN_CMOCKA_DIR)/bin/cmocka.dll $(OUT_DIR)/ $(MAKE) -C utest BOXES_PLATFORM=win32 C_INCLUDE_PATH=../$(PCRE2_DIR)/src:../$(WIN_CMOCKA_DIR)/include \ diff --git a/src/Makefile b/src/Makefile index 8e03ff12..48ddd71a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,7 +61,7 @@ cov: flags_$(BOXES_PLATFORM) | $(OUT_DIR) debug: flags_$(BOXES_PLATFORM) | $(OUT_DIR) $(MAKE) -C $(OUT_DIR) -f $(SRC_DIR)/Makefile BOXES_PLATFORM=$(BOXES_PLATFORM) ALL_OBJ="$(ALL_OBJ)" STRIP=false \ - CFLAGS_ADDTL="-g $(CFLAGS_ADDTL)" flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME) + CFLAGS_ADDTL="-ggdb3 $(CFLAGS_ADDTL)" flags_$(BOXES_PLATFORM) $(BOXES_EXECUTABLE_NAME) boxes: $(ALL_OBJ) | check_dir $(CC) $(LDFLAGS) $^ -o $@ -lunistring -lpcre2-32 -lncurses diff --git a/utest/Makefile b/utest/Makefile index d3bed441..04f3e5f0 100644 --- a/utest/Makefile +++ b/utest/Makefile @@ -58,6 +58,13 @@ utest: flags_$(BOXES_PLATFORM) | $(OUT_DIR) cd $(OUT_DIR) ; ./$(UTEST_EXECUTABLE_NAME) @OUT_DIR=$(OUT_DIR) SRC_DIR=$(SRC_DIR) ./report.sh +debugutest: flags_$(BOXES_PLATFORM) | $(OUT_DIR) + $(MAKE) -C $(OUT_DIR) -f $(UTEST_DIR)/Makefile BOXES_PLATFORM=$(BOXES_PLATFORM) UTEST_OBJ="$(UTEST_OBJ)" \ + CFLAGS_ADDTL="-ggdb3 $(CFLAGS_ADDTL)" flags_$(BOXES_PLATFORM) $(UTEST_EXECUTABLE_NAME) + rm -f $(OUT_DIR)/*.gcda + cd $(OUT_DIR) ; ./$(UTEST_EXECUTABLE_NAME) + @OUT_DIR=$(OUT_DIR) SRC_DIR=$(SRC_DIR) ./report.sh + unittest: $(UTEST_OBJ) | check_dir $(CC) $(LDFLAGS) $^ $(shell cat modules.txt) -o $@ -lunistring -lpcre2-32 -lcmocka