1 # Makefile for the mbsePi-apps/thermometers. |
|
2 |
|
3 include ../Makefile.global |
|
4 |
|
5 SRCS = $(wildcard *.c) |
|
6 HDRS = $(wildcard *.h) |
|
7 OBJS = $(SRCS:.c=.o) |
|
8 TARGET = thermometers |
|
9 OTHER = Makefile |
|
10 |
|
11 ############################################################################# |
|
12 |
|
13 .c.o: |
|
14 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< |
|
15 |
|
16 all: ${TARGET} |
|
17 |
|
18 thermometers: ${OBJS} |
|
19 ${CC} -o thermometers ${OBJS} ${LDFLAGS} ${LIBS} |
|
20 |
|
21 clean: |
|
22 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak |
|
23 |
|
24 install: all |
|
25 ${INSTALL} -c -s -g root -o root -m 0755 thermometers ${BINDIR} |
|
26 |
|
27 filelist: Makefile |
|
28 BASE=`pwd`; \ |
|
29 BASE=`basename $${BASE}`; \ |
|
30 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist |
|
31 |
|
32 depend: |
|
33 @rm -f Makefile.bak; \ |
|
34 mv Makefile Makefile.bak; \ |
|
35 sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ |
|
36 ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ |
|
37 >>Makefile; \ |
|
38 ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ |
|
39 for f in ${SRCS}; \ |
|
40 do \ |
|
41 ${ECHO} "Dependencies for $$f:\c"; \ |
|
42 ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ |
|
43 for h in `sed -n -e \ |
|
44 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ |
|
45 do \ |
|
46 ${ECHO} " $$h\c"; \ |
|
47 ${ECHO} " $$h\c" >>Makefile; \ |
|
48 done; \ |
|
49 ${ECHO} " done."; \ |
|
50 ${ECHO} "" >>Makefile; \ |
|
51 done; \ |
|
52 ${ECHO} '# End of generated dependencies' >>Makefile |
|
53 |
|
54 # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT |
|
55 # Dependencies generated by make depend |
|
56 thermometers.o: thermometers.h |
|
57 lcd-pcf8574.o: thermometers.h |
|
58 xutil.o: thermometers.h |
|
59 rdconfig.o: thermometers.h |
|
60 # End of generated dependencies |
|