From 77f347fb4e37666e2d687cee99dfa4cb4e441b8a Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Sun, 24 Jan 2021 09:45:29 +0000 Subject: check in humidity sensor + better sleep mode --- humidity_sensors/app/Makefile | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 humidity_sensors/app/Makefile (limited to 'humidity_sensors/app/Makefile') diff --git a/humidity_sensors/app/Makefile b/humidity_sensors/app/Makefile new file mode 100644 index 0000000..01d0888 --- /dev/null +++ b/humidity_sensors/app/Makefile @@ -0,0 +1,51 @@ +CSRCS=main.c util.c uart.c i2c_bb.c clock.c gpio.c sht20.c stm8s_it.c awu.c +PROG=build/main.hex +LIBS= +SPL_CSRCS = + +SPL_ROOT=../STM8S_StdPeriph_Lib +SPL_SRC = $(SPL_ROOT)/Libraries/STM8S_StdPeriph_Driver/src +SPL_INC = $(SPL_ROOT)/Libraries/STM8S_StdPeriph_Driver/inc + +CFLAGS=--opt-code-size --std-sdcc99 --all-callee-saves --verbose --stack-auto --fverbose-asm --float-reent +CPPFLAGS=-I./ -I${SPL_INC} -DSTM8S003 +CC=sdcc-sdcc -mstm8 +AS=sdcc-sdasstm8 +STM8FLASH=../stm8flash/stm8flash + +LIBOBJ=${SPL_CSRCS:%.c=build/%.rel} +OBJS=${CSRCS:%.c=build/%.rel} ${SPL_CSRCS:%.c=build/%.rel} + +${PROG}: ${OBJS} + ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${OBJS} + +build/%.rel:${SPL_SRC}/%.c + ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $< + +build/%.rel:%.c + ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $< + + +flash: ${PROG} ${STM8FLASH} + ${STM8FLASH} -c stlinkv2 -p stm8s003?3 -s flash -w ${PROG} + +${STM8FLASH}: + make -C $(dir $@) + + +tidy: + astyle -A3 -s2 --attach-extern-c -L -c -w -Y -m0 -f -p -H -U -k3 -xj -xd ${CSRCS} + +protos: + echo > prototypes.h + cproto -E "${CC} -E ${CPPFLAGS} -D__trap= -D__interrupt\(a\)= -DPROTOS" ${CSRCS} > prototypes.h.tmp + /bin/mv -f prototypes.h.tmp prototypes.h + +clean: + /bin/rm -rf build *~ *.orig + +$(shell mkdir -p build) + + + + -- cgit v1.2.3