thermferm/Makefile

Sun, 05 May 2024 17:24:54 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 05 May 2024 17:24:54 +0200
changeset 730
6eba006ed8f5
parent 714
24749c296a50
permissions
-rw-r--r--

Much faster shutdown of the websocket service.

41
f534ace74eea Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents: 39
diff changeset
1 # Makefile for the mbsePi-apps/thermferm.
26
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 include ../Makefile.global
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4
39
442357970a34 More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents: 27
diff changeset
5 SRCS = $(wildcard *.c)
442357970a34 More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents: 27
diff changeset
6 HDRS = $(wildcard *.h)
442357970a34 More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents: 27
diff changeset
7 OBJS = $(SRCS:.c=.o)
51
a03b6dac5398 Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents: 47
diff changeset
8 SLIBS = -lpthread
41
f534ace74eea Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents: 39
diff changeset
9 TARGET = thermferm
26
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 OTHER = Makefile
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 #############################################################################
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 .c.o:
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 all: ${TARGET}
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18
41
f534ace74eea Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents: 39
diff changeset
19 thermferm: ${OBJS} ${SLIBS}
f534ace74eea Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents: 39
diff changeset
20 ${CC} -o thermferm ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS}
26
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 clean:
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 install: all
635
bf2c0f31147b Create installation directories
Michiel Broek <mbroek@mbse.eu>
parents: 633
diff changeset
26 @mkdir -p ${DESTDIR}${BINDIR}
633
8b84e73af50e Add DESTDIR installation target. Some kicad update again. Moved init script to /etc/rc.d
Michiel Broek <mbroek@mbse.eu>
parents: 591
diff changeset
27 ${INSTALL} -c -s -g root -o root -m 0755 thermferm ${DESTDIR}${BINDIR}
26
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 filelist: Makefile
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 BASE=`pwd`; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 BASE=`basename $${BASE}`; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 depend:
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 @rm -f Makefile.bak; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 mv Makefile Makefile.bak; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 >>Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 ${ECHO} '# Dependencies generated by make depend' >>Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 for f in ${SRCS}; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 do \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 ${ECHO} "Dependencies for $$f:\c"; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 for h in `sed -n -e \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 do \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 ${ECHO} " $$h\c"; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 ${ECHO} " $$h\c" >>Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 done; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 ${ECHO} " done."; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 ${ECHO} "" >>Makefile; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53 done; \
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 ${ECHO} '# End of generated dependencies' >>Makefile
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57 # Dependencies generated by make depend
675
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
58 delay.o: delay.h thermferm.h
684
b2265c7e5707 Updated dependencies. Devices json data is created in de devices source for all places where it is needed. Added devices_ws function to broadcast all devices, to be used when any device is changed. The devices loop detects changes in input values and calls devices_ws if so. The server uses the general devices json data.
Michiel Broek <mbroek@mbse.eu>
parents: 675
diff changeset
59 devices.o: thermferm.h delay.h devices.h rc-switch.h panel.h xutil.h websocket.h
675
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
60 futil.o: thermferm.h futil.h
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
61 lcd-buffer.o: thermferm.h lcd-buffer.h lcd-pcf8574.h slcd.h panel.h
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
62 lcd-pcf8574.o: thermferm.h lcd-pcf8574.h slcd.h
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
63 lock.o: lock.h thermferm.h
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
64 mqtt.o: thermferm.h rdconfig.h devices.h xutil.h delay.h mqtt.h websocket.h
693
3518c07737d8 Version 0.9.19a2. Dropped TEMPSTATE[] and only use DEVPRESENT[] to mark devices state. Adjusted webpages for this switch in responses. Adjusted MySQL mon_fermenters enum values too. Rename some global Config records to better reflect their real use.Added one-wire json records and websocket. Announce when some onewire device changes. Add UNITS JSON command without parameter. Dropped global tempFormat setting that was never used.
Michiel Broek <mbroek@mbse.eu>
parents: 684
diff changeset
65 one-wire.o: thermferm.h statetbl.h one-wire.h devices.h delay.h websocket.h futil.h xutil.h
652
16d3d4b58b5b Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents: 635
diff changeset
66 panel.o: thermferm.h delay.h lcd-pcf8574.h slcd.h panel.h
316
73cd31dc6ce1 Moved pid function to separate files
Michiel Broek <mbroek@mbse.eu>
parents: 259
diff changeset
67 pid.o: thermferm.h pid.h
652
16d3d4b58b5b Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents: 635
diff changeset
68 rc-switch.o: thermferm.h xutil.h delay.h rc-switch.h
675
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
69 rdconfig.o: rdconfig.h thermferm.h pid.h futil.h xutil.h
714
24749c296a50 Version 0.9.19b2. Simulator redesign and it is now possible to run more then one simulator. All simulated devices have address names that include the simulator number. Added the setup screen for the most part. Not compatible with previous versions if a simulator was used, delete all simulators and simulated devices during stop and start.
Michiel Broek <mbroek@mbse.eu>
parents: 693
diff changeset
70 server.o: rdconfig.h thermferm.h delay.h one-wire.h devices.h server.h simulator.h lcd-buffer.h xutil.h mqtt.h
24749c296a50 Version 0.9.19b2. Simulator redesign and it is now possible to run more then one simulator. All simulated devices have address names that include the simulator number. Added the setup screen for the most part. Not compatible with previous versions if a simulator was used, delete all simulators and simulated devices during stop and start.
Michiel Broek <mbroek@mbse.eu>
parents: 693
diff changeset
71 simulator.o: thermferm.h delay.h xutil.h websocket.h simulator.h
652
16d3d4b58b5b Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents: 635
diff changeset
72 slcd.o: thermferm.h slcd.h futil.h xutil.h
684
b2265c7e5707 Updated dependencies. Devices json data is created in de devices source for all places where it is needed. Added devices_ws function to broadcast all devices, to be used when any device is changed. The devices loop detects changes in input values and calls devices_ws if so. The server uses the general devices json data.
Michiel Broek <mbroek@mbse.eu>
parents: 675
diff changeset
73 thermferm.o: lock.h rdconfig.h server.h thermferm.h devices.h delay.h simulator.h lcd-pcf8574.h lcd-buffer.h slcd.h panel.h one-wire.h futil.h xutil.h pid.h mqtt.h statetbl.h websocket.h
b2265c7e5707 Updated dependencies. Devices json data is created in de devices source for all places where it is needed. Added devices_ws function to broadcast all devices, to be used when any device is changed. The devices loop detects changes in input values and calls devices_ws if so. The server uses the general devices json data.
Michiel Broek <mbroek@mbse.eu>
parents: 675
diff changeset
74 websocket.o: thermferm.h xutil.h devices.h websocket.h
675
825210ba2707 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents: 660
diff changeset
75 xutil.o: thermferm.h xutil.h
26
9322c619c525 Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76 # End of generated dependencies

mercurial