Add menu system, fix Makefile
This commit is contained in:
26
Makefile
26
Makefile
@ -1,20 +1,22 @@
|
||||
CC=clang
|
||||
CFLAGS=-std=c99 -Wall
|
||||
LD=clang
|
||||
LDFLAGS=-lgpio -lfigpar
|
||||
SRCS=src/main.c src/util.c src/lcd.c src/ths.c src/button.c
|
||||
PROG=rpi4b-temp-humidity
|
||||
|
||||
# -*- mode: makefile -*-
|
||||
.include "config.mk"
|
||||
|
||||
CC=clang
|
||||
CFLAGS=-std=c11 -Wall ${SQLITE3_CFLAGS}
|
||||
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/screen.c
|
||||
PROG=rpi4b-temp-humidity
|
||||
|
||||
OBJS=${SRCS:C/^src/bin/:C/.c$/.o/}
|
||||
bin/${PROG}: ${OBJS}
|
||||
${LD} ${LDFLAGS} -o ${@} ${OBJS}
|
||||
|
||||
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
|
||||
bin/main.o bin/util.o bin/lcd.o bin/ths.o bin/button.o bin/screen.o: src/util.h
|
||||
bin/main.o bin/lcd.o bin/screen.o: src/lcd.h
|
||||
bin/main.o bin/ths.o bin/screen.o: src/ths.h
|
||||
bin/main.o bin/button.o bin/screen.o: src/button.h
|
||||
bin/main.o bin/screen.o: src/screen.h
|
||||
|
||||
${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
@mkdir -p bin/
|
||||
@ -27,7 +29,7 @@ ${OBJS}: ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
-DDEFAULT_FAIL_LIMIT="${DEFAULT_FAIL_LIMIT}"\
|
||||
-DDEFAULT_LCD_VERSION="\"${DEFAULT_LCD_VERSION}\""\
|
||||
-DDEFAULT_REFRESH_TIME="${DEFAULT_REFRESH_TIME}"\
|
||||
-o ${@} ${.ALLSRC}
|
||||
-o ${@} ${.TARGET:C/^bin/src/:C/.o$/.c/}
|
||||
|
||||
clean:
|
||||
rm -rf bin/
|
||||
|
Reference in New Issue
Block a user