bmsd/Makefile

changeset 0
033898178630
child 5
36387e45a194
equal deleted inserted replaced
-1:000000000000 0:033898178630
1 # Makefile for the mbsePi-apps/thermferm.
2
3 include ../Makefile.global
4
5 SRCS = $(wildcard *.c)
6 HDRS = $(wildcard *.h)
7 OBJS = $(SRCS:.c=.o)
8 SLIBS = -lpthread
9 TARGET = bmsd
10 OTHER = Makefile
11
12 #############################################################################
13
14 .c.o:
15 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
16
17 all: ${TARGET}
18
19 bmsd: ${OBJS} ${SLIBS}
20 ${CC} -o bmsd ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS}
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 bmsd ${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
57 mqtt.o: bms.h xutil.h mqtt.h nodes.h
58 nodes.o: bms.h xutil.h nodes.h mysql.h
59 futil.o: bms.h futil.h
60 lock.o: lock.h bms.h futil.h
61 bms.o: bms.h xutil.h rdconfig.h lock.h mqtt.h mysql.h
62 xutil.o: bms.h xutil.h
63 rdconfig.o: bms.h xutil.h futil.h rdconfig.h
64 mysql.o: bms.h xutil.h mysql.h
65 # End of generated dependencies

mercurial