Tue, 06 May 2014 13:24:25 +0200
Sensor reading is done in a thread
3 | 1 | # Makefile for the mbsePi-apps/thermometers. |
2 | ||
3 | include ../Makefile.global | |
4 | ||
5 | SRCS = main.c | |
6 | HDRS = main.h | |
7 | OBJS = main.o | |
8
e584bc0177df
Server communication seems ok, can handle server shutdowns too.
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
8 | SLIBS = ../lib/libmbse.a |
3 | 9 | TARGET = thermometers |
10 | OTHER = Makefile | |
11 | ||
12 | ############################################################################# | |
13 | ||
14 | .c.o: | |
15 | ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< | |
16 | ||
17 | all: ${TARGET} | |
18 | ||
8
e584bc0177df
Server communication seems ok, can handle server shutdowns too.
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
19 | thermometers: ${OBJS} ${SLIBS} |
e584bc0177df
Server communication seems ok, can handle server shutdowns too.
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
20 | ${CC} -o thermometers ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS} |
3 | 21 | |
22 | clean: | |
23 | rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak | |
24 | ||
25 | install: all | |
26 | ${INSTALL} -c -s -g root -o root -m 0755 thermometers ${BINDIR} | |
27 | ||
28 | filelist: Makefile | |
29 | BASE=`pwd`; \ | |
30 | BASE=`basename $${BASE}`; \ | |
31 | (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist | |
32 | ||
33 | depend: | |
34 | @rm -f Makefile.bak; \ | |
35 | mv Makefile Makefile.bak; \ | |
36 | sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ | |
37 | ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ | |
38 | >>Makefile; \ | |
39 | ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ | |
40 | for f in ${SRCS}; \ | |
41 | do \ | |
42 | ${ECHO} "Dependencies for $$f:\c"; \ | |
43 | ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ | |
44 | for h in `sed -n -e \ | |
45 | 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ | |
46 | do \ | |
47 | ${ECHO} " $$h\c"; \ | |
48 | ${ECHO} " $$h\c" >>Makefile; \ | |
49 | done; \ | |
50 | ${ECHO} " done."; \ | |
51 | ${ECHO} "" >>Makefile; \ | |
52 | done; \ | |
53 | ${ECHO} '# End of generated dependencies' >>Makefile | |
54 | ||
55 | # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT | |
56 | # Dependencies generated by make depend | |
8
e584bc0177df
Server communication seems ok, can handle server shutdowns too.
Michiel Broek <mbroek@mbse.eu>
parents:
3
diff
changeset
|
57 | main.o: ../lib/mbselib.h main.h |
3 | 58 | # End of generated dependencies |