Make button.c and button.h

This commit is contained in:
2024-02-28 12:09:18 -08:00
parent 03d554f34f
commit 900243fb1c
6 changed files with 161 additions and 23 deletions

View File

@ -1,8 +1,8 @@
CC=clang
CFLAGS=-std=c99
CFLAGS=-std=c99 -Wall
LD=clang
LDFLAGS=-lgpio -lfigpar
SRCS=src/main.c src/util.c src/lcd.c src/ths.c
SRCS=src/main.c src/util.c src/lcd.c src/ths.c src/button.c
PROG=rpi4b-temp-humidity
.include "config.mk"
@ -11,9 +11,10 @@ OBJS=${SRCS:C/^src/bin/:C/.c$/.o/}
bin/${PROG}: ${OBJS}
${LD} ${LDFLAGS} -o ${@} ${OBJS}
main.o util.o lcd.o ths.o: util.h
main.o util.o lcd.o ths.o button.o: util.h
main.o lcd.o: lcd.h
main.o ths.o: ths.h
main.o button.o: button.h
${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
@mkdir -p bin/
@ -25,6 +26,7 @@ ${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
-DDEFAULT_FAIL_KEY="\"${DEFAULT_FAIL_KEY}\""\
-DDEFAULT_FAIL_LIMIT="${DEFAULT_FAIL_LIMIT}"\
-DDEFAULT_LCD_VERSION="\"${DEFAULT_LCD_VERSION}\""\
-DDEFAULT_REFRESH_TIME="${DEFAULT_REFRESH_TIME}"\
-o ${@} ${.ALLSRC}
clean: