Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement code size count from makefile. #23

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions mk/conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ ifeq ("$(STORE)", "file")
CONFIG_DEFINES += -DE4_STORE_FILE
endif

# tools for specific workflows (so their location can be custom)
CLANGTIDY ?= clang-tidy

codesize: lib
@$(eval CODESIZE=`wc -c < "$(LIB)"`)
@echo "Code size in current configuration:"
@echo "$(CODESIZE)"


.PHONY postbuild_config_echo:
$(info Build Successful)
@$(eval CODESIZE=`wc -c < "$(LIB)"`)
@echo ""
@echo "================================================================================="
@echo ""
Expand All @@ -53,5 +62,9 @@ ifeq ("$(CONF)", "all")
@echo ""
@echo "Shared Library: $(LIBSO)"
endif
@echo ""
@echo "*** Code Size (static lib) in bytes: $(CODESIZE) ***"
@echo ""
@echo "================================================================================="


2 changes: 1 addition & 1 deletion mk/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ format:
clang-format -i src/*.c src/crypto/*.c include/e4/*.h include/e4/crypto/*.h include/e4/internal/*.h

tidy: setup $(BUILDDIR)/include/e4config/e4_config.h
clang-tidy -checks="-*,clang-analyzer-core.*" $(SRCS) -- $(CFLAGS) $(INCLUDES) $(CONFIG_DEFINES)
$(CLANGTIDY) -checks="-*,clang-analyzer-core.*" $(SRCS) -- $(CFLAGS) $(INCLUDES) $(CONFIG_DEFINES)

checksec:
checksec --format=cli --file=build/all/lib/libe4.so.1.0.0
Expand Down