From 4ac054d6514689ffc1add730c450ca642beec9b7 Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Tue, 19 Apr 2022 14:24:33 +0300 Subject: [PATCH] makefile updated --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e9b3fbd..0a91aa4 100644 --- a/Makefile +++ b/Makefile @@ -6,35 +6,38 @@ CMP=gcc OPT_ARGS=-O2 -flto WARN_ARGS=-Wall -Wno-discarded-qualifiers -all: build_lib +all: build_test clear_c: clear clear_bin: - @echo -e '\e[96m--------------[clear_bin]--------------\e[0m' + @echo -e '\n\e[96m-------------[clear_bin]--------------\e[0m' rm -rf $(OUTDIR) mkdir $(OUTDIR) clang: CMP=clang + WARN_ARGS=-Wall -Wno-ignored-qualifiers -Wno-incompatible-pointer-types-discards-qualifiers clang: all TEST_FILE=kerep_test.com TEST_ARGS=$(WARN_ARGS) $(SRC) $(TESTS) -o $(OUTDIR)/$(TEST_FILE) build_test: clear_c clear_bin - @echo -e '\n\e[96m----------------[build_test]----------------\e[0m' + @echo -e '\n\e[96m-------------[build_test]-------------\e[0m' $(CMP) $(OPT_ARGS) $(TEST_ARGS) build_test_dbg: clear_c clear_bin - @echo -e '\n\e[96m--------------[build_test_dbg]--------------\e[0m' + @echo -e '\n\e[96m-----------[build_test_dbg]-----------\e[0m' $(CMP) -g -O0 $(TEST_ARGS).dbg test: build_test - @echo -e '\n\e[96m----------------[test]-----------------\e[0m' + @echo -e '\n\e[96m-------------[build_test]-------------\e[0m' + tabs 4 $(OUTDIR)/$(TEST_FILE) valgrind: build_test_dbg - @echo -e '\n\e[96m--------------[valgrind]---------------\e[0m' + @echo -e '\n\e[96m--------------[valgrind]--------------\e[0m' + tabs 4 valgrind -s --read-var-info=yes --track-origins=yes --fullpath-after=kerep/ \ --leak-check=full --show-leak-kinds=all $(OUTDIR)/$(TEST_FILE).dbg @@ -43,5 +46,5 @@ LIB_ARGS=$(OPT_ARGS) $(WARN_ARGS)\ -fpic -shared -Wl,-soname,$(LIB_FILE)\ $(SRC) tests/test_marshalling.c -o $(OUTDIR)/$(LIB_FILE) build_lib: clear_c clear_bin - @echo -e '\n\e[96m-------------[build_lib]---------------\e[0m' + @echo -e '\n\e[96m-------------[build_lib]--------------\e[0m' $(CMP) $(LIB_ARGS)