Skip to content

Commit

Permalink
Update makefile for SLOC
Browse files Browse the repository at this point in the history
  • Loading branch information
tmael authored and danielinux committed Aug 22, 2023
1 parent a29b78d commit 1fcac35
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ config: FORCE
check_config:
$(MAKE) -C tools/check_config run

line-count:
cloc --force-lang-def cloc_lang_def.txt src/boot_arm.c src/image.c src/libwolfboot.c src/loader.c src/update_flash.c

line-count-nrf52:
cloc --force-lang-def cloc_lang_def.txt src/boot_arm.c src/image.c src/libwolfboot.c src/loader.c src/update_flash.c hal/nrf52.c

line-count-x86:
cloc --force-lang-def cloc_lang_def.txt src/boot_x86_fsp.c src/boot_x86_fsp_payload.c src/boot_x86_fsp_start.S src/image.c src/keystore.c src/libwolfboot.c src/loader.c src/string.c src/update_disk.c src/x86/ahci.c src/x86/ata.c src/x86/common.c src/x86/gpt.c src/x86/hob.c src/pci.c src/x86/tgl_fsp.c hal/x86_fsp_tgl.c hal/x86_uart.c

%.o:%.c
@echo "\t[CC-$(ARCH)] $@"
$(Q)$(CC) $(CFLAGS) -c $(OUTPUT_FLAG) $@ $^
Expand Down
10 changes: 10 additions & 0 deletions cloc_lang_def.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C
filter remove_matches ^\s*[{}]\s*$
filter rm_comments_in_strings " /* */
filter rm_comments_in_strings " //
filter call_regexp_common C++
extension c
extension ec
extension pgc
3rd_gen_scale 0.77
end_of_line_continuation \\$

0 comments on commit 1fcac35

Please sign in to comment.