bmsd/Makefile

Tue, 31 Aug 2021 20:48:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 31 Aug 2021 20:48:37 +0200
changeset 774
92e1e8f175a2
parent 749
0541659b6140
child 795
9472106a3143
permissions
-rw-r--r--

Split batch, adjust mash step volume. In the duplicated log_brew handle the missing values. In save product, round the mash step sg to 4 decimals. In prod_edit, ingredients are stored as strings, not arrays. This triggered a memory corruption that only happened in rare circumstances. Don't fix mash step fields in the javascript, it is already done during load from the database. Calculation of the mash volume is rounded to 6 decimals. Enter mash step Brix/Plato value, the SG result is rounded to 4 decimals.

# Makefile for the bmsd/bmsd.

include ../Makefile.global

SRCS		= $(wildcard *.c)
HDRS		= $(wildcard *.h)
OBJS		= $(SRCS:.c=.o)
SLIBS		= -lpthread
TARGET		= bmsd
OTHER		= Makefile

#############################################################################

.c.o:
		${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<

all:		${TARGET}

bmsd:		${OBJS} ${SLIBS}
		${CC} -o bmsd ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS}

clean:
		rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak

install:	all
		${INSTALL} -d -g 314 -o 314 ${PREFIX} ${BINDIR}
		${INSTALL} -c -s -g 314 -o 314 -m 0755 bmsd ${BINDIR}

filelist:	Makefile
		BASE=`pwd`; \
		BASE=`basename $${BASE}`; \
		(for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist

depend:
	@rm -f Makefile.bak; \
	mv Makefile Makefile.bak; \
	sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
	${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \
		>>Makefile; \
	${ECHO} '# Dependencies generated by make depend' >>Makefile; \
	for f in ${SRCS}; \
	do \
		${ECHO} "Dependencies for $$f:\c"; \
		${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
		for h in `sed -n -e \
			's/^#[ 	]*include[ 	]*"\([^"]*\)".*/\1/p' $$f`; \
		do \
			${ECHO} " $$h\c"; \
			${ECHO} " $$h\c" >>Makefile; \
		done; \
		${ECHO} " done."; \
		${ECHO} "" >>Makefile; \
	done; \
	${ECHO} '# End of generated dependencies' >>Makefile

# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
# Dependencies generated by make depend
bms.o: bms.h xutil.h futil.h rdconfig.h lock.h mqtt.h mysql.h nodes.h websocket.h
co2meters.o: bms.h xutil.h co2meters.h mysql.h websocket.h nodes.h
fermenters.o: bms.h xutil.h fermenters.h mysql.h mqtt.h websocket.h nodes.h
futil.o: bms.h futil.h
ispindels.o: bms.h xutil.h ispindels.h mysql.h nodes.h websocket.h
lock.o: lock.h bms.h futil.h
mqtt.o: bms.h xutil.h mqtt.h nodes.h fermenters.h co2meters.h ispindels.h
mysql.o: bms.h xutil.h mysql.h nodes.h
nodes.o: bms.h xutil.h nodes.h mysql.h websocket.h
rdconfig.o: bms.h xutil.h futil.h rdconfig.h
websocket.o: bms.h xutil.h websocket.h fermenters.h co2meters.h ispindels.h
xutil.o: bms.h xutil.h
# End of generated dependencies

mercurial