mash/Makefile

changeset 103
99c47a8a61cb
child 332
32ee2be19354
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mash/Makefile	Sat Jul 12 21:59:19 2014 +0200
@@ -0,0 +1,65 @@
+# Makefile for the mbsePi-apps/thermferm.
+
+include ../Makefile.global
+
+SRCS		= $(wildcard *.c)
+HDRS		= $(wildcard *.h)
+OBJS		= $(SRCS:.c=.o)
+SLIBS		= -lpthread
+TARGET		= mash
+OTHER		= Makefile
+
+#############################################################################
+
+.c.o:
+		${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
+
+all:		${TARGET}
+
+mash:		${OBJS} ${SLIBS}
+		${CC} -o mash ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS}
+
+clean:
+		rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
+
+install:	all
+		${INSTALL} -c -s -g root -o root -m 0755 mash ${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
+sensors.o: mash.h
+lock.o: mash.h lock.h
+beerxml.o: mash.h beerxml.h
+lcd-pcf8574.o: mash.h lcd-pcf8574.h
+mash.o: mash.h lock.h logger.h xutil.h beerxml.h
+xutil.o: mash.h xutil.h
+rdconfig.o: mash.h xutil.h
+logger.o: mash.h xutil.h logger.h
+# End of generated dependencies

mercurial