From 437de29ce7a6faeb976f48e58a6573022b1bc1e8 Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 26 Sep 2008 15:21:13 +0000 Subject: [PATCH] Added splintrc and lint checking. --- bacnet-stack/ports/atmega168/.splintrc | 13 +++++++++++++ bacnet-stack/ports/atmega168/Makefile | 18 +++++++++++------- bacnet-stack/ports/atmega168/main.c | 1 + 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 bacnet-stack/ports/atmega168/.splintrc diff --git a/bacnet-stack/ports/atmega168/.splintrc b/bacnet-stack/ports/atmega168/.splintrc new file mode 100644 index 00000000..2a42301b --- /dev/null +++ b/bacnet-stack/ports/atmega168/.splintrc @@ -0,0 +1,13 @@ +-sysdirs C:\WinAVR~1\avr\include;C:\WinAVR~1\lib\gcc\avr\4.2.2\include;C:\WinAVR~1\avr\include\avr;C:\WinAVR~1\avr\include\compat;C:\WinAVR~1\avr\include\util +-IC:\WinAVR~1\avr\include +-IC:\WinAVR~1\avr\include\avr +-IC:\WinAVR~1\avr\include\compat +-IC:\WinAVR~1\avr\include\util +-IC:\WinAVR~1\lib\gcc\avr\4.2.2\include +-I../../include +-I. +-castfcnptr +-fullinitblock +-weak +-D__AVR_ATmega168__ +-D__GNUC__ diff --git a/bacnet-stack/ports/atmega168/Makefile b/bacnet-stack/ports/atmega168/Makefile index 42c79bd8..ef565d99 100644 --- a/bacnet-stack/ports/atmega168/Makefile +++ b/bacnet-stack/ports/atmega168/Makefile @@ -12,6 +12,7 @@ AR = avr-ar OBJCOPY = avr-objcopy OBJDUMP = avr-objdump SIZE = avr-size +LINT = splint # Source locations BACNET_CORE = ../../src @@ -24,21 +25,21 @@ CSRC = main.c \ rs485.c \ dlmstp.c \ apdu.c \ - $(BACNET_CORE)/crc.c - -# common demo files needed -DEMOSRC = h_rp.c \ + h_rp.c \ device.c \ av.c \ bv.c \ - $(BACNET_DEMO)/handler/txbuf.c \ - $(BACNET_DEMO)/handler/h_npdu.c \ - $(BACNET_DEMO)/handler/noserv.c \ h_whois.c \ h_wp.c +# common demo files needed +DEMOSRC = $(BACNET_DEMO)/handler/txbuf.c \ + $(BACNET_DEMO)/handler/h_npdu.c \ + $(BACNET_DEMO)/handler/noserv.c + # core BACnet stack files CORESRC = \ + $(BACNET_CORE)/crc.c \ $(BACNET_CORE)/apdu.c \ $(BACNET_CORE)/npdu.c \ $(BACNET_CORE)/bacdcode.c \ @@ -171,6 +172,9 @@ size: ${TARGET_ELF} @echo @${SIZE} -C --mcu=${MCU} ${TARGET_ELF} +lint: + $(LINT) $(BFLAGS) $(CSRC) + ## Clean target .PHONY: clean clean: diff --git a/bacnet-stack/ports/atmega168/main.c b/bacnet-stack/ports/atmega168/main.c index b04570bd..5a3d9989 100644 --- a/bacnet-stack/ports/atmega168/main.c +++ b/bacnet-stack/ports/atmega168/main.c @@ -30,6 +30,7 @@ #include "rs485.h" #include "datalink.h" #include "npdu.h" +#include "handlers.h" #include "txbuf.h" #include "iam.h" #include "device.h"