]> git.earman.xyz Git - sensor-watch.git/commitdiff
add rule for static analysis
authorJoey Castillo <joeycastillo@utexas.edu>
Sun, 10 Apr 2022 16:45:21 +0000 (12:45 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Sun, 10 Apr 2022 16:45:21 +0000 (12:45 -0400)
rules.mk

index 1aa135a8ea1c9706425004ebe72b98c7ace38b2f..2f2f39225c09acba0150ededb3f4227f58788c64 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -4,6 +4,8 @@ OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
 
 SUBMODULES = tinyusb
 
+COBRA = cobra -f
+
 ifndef EMSCRIPTEN
 all: directory $(SUBMODULES) $(BUILD)/$(BIN).elf $(BUILD)/$(BIN).hex $(BUILD)/$(BIN).bin $(BUILD)/$(BIN).uf2 size
 else
@@ -54,4 +56,7 @@ clean:
        @echo clean
        @-rm -rf $(BUILD)
 
+analyze:
+       @$(COBRA) basic $(INCLUDES) $(DEFINES) $(SRCS)
+
 -include $(wildcard $(BUILD)/*.d)