Allow user to select temperature unit
This commit is contained in:
12
Makefile
12
Makefile
@ -7,7 +7,7 @@ LD=clang
|
||||
LDFLAGS=-lgpio -lfigpar -lpthread ${SQLITE3_LDFLAGS}
|
||||
SRCS=src/main.c src/util.c src/lcd.c src/ths.c src/button.c src/ui/screen.c\
|
||||
src/ui/datesel.c src/ui/statsby.c src/ui/datapoints.c src/ui/timesel.c\
|
||||
src/ui/statrange.c
|
||||
src/ui/statrange.c src/config.c
|
||||
PROG=rpi4b-temp-humidity
|
||||
|
||||
OBJS=${SRCS:C/^src/bin/:C/.c$/.o/}
|
||||
@ -29,17 +29,22 @@ bin/ui/statrange.o: src/ui/screen.h
|
||||
bin/main.o bin/ui/datesel.o bin/ui/statsby.o: src/ui/datesel.h
|
||||
bin/ui/datapoints.o bin/ui/timesel.o bin/ui/statrange.o: src/ui/datesel.h
|
||||
|
||||
bin/main.o bin/ths.o bin/ui/screen.o bin/ui/statsby.o: src/ths.h
|
||||
bin/ui/timesel.o src/ui/statrange.o: src/ths.h
|
||||
|
||||
bin/main.o bin/ui/timesel.o bin/ui/datapoints.o: src/ui/timesel.h
|
||||
bin/ui/statrange.o: src/ui/timesel.h
|
||||
|
||||
bin/main.o bin/ths.o: src/ths.h
|
||||
bin/main.o bin/config.o: src/config.h
|
||||
bin/main.o bin/button.o bin/ui/screen.o: src/button.h
|
||||
bin/main.o bin/ui/statsby.o: src/ui/statsby.h
|
||||
bin/main.o bin/ui/datapoints.o: src/ui/datapoints.h
|
||||
bin/main.o bin/ui/statrange.o: src/ui/statrange.h
|
||||
|
||||
.if "${DEFAULT_TEMP_UNIT}" != "F" && "${DEFAULT_TEMP_UNIT}" != "C" &&\
|
||||
"${DEFAULT_TEMP_UNIT}" != "c" && "${DEFAULT_TEMP_UNIT}" != "c"
|
||||
.error Invalid temperature unit "${DEFAULT_TEMP_UNIT}"
|
||||
.endif
|
||||
|
||||
${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
@mkdir -p ${.TARGET:H}
|
||||
${CC} ${CFLAGS} -c\
|
||||
@ -51,6 +56,7 @@ ${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
-DDEFAULT_FAIL_LIMIT="${DEFAULT_FAIL_LIMIT}"\
|
||||
-DDEFAULT_DATABASE_LOCATION="\"${DEFAULT_DATABASE_LOCATION}\""\
|
||||
-DDEFAULT_REFRESH_TIME="${DEFAULT_REFRESH_TIME}"\
|
||||
-DDEFAULT_TEMP_UNIT="'${DEFAULT_TEMP_UNIT}'"\
|
||||
-o ${@} ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
|
||||
clean:
|
||||
|
Reference in New Issue
Block a user