tools/Makefile

changeset 639
276ee5b61348
parent 636
80967361f257
child 640
0f6daacdd597
equal deleted inserted replaced
638:186f0c2d3e76 639:276ee5b61348
1 # Makefile for the mbsePi-apps/thermferm. 1 # Makefile for the mbsePi-apps/thermferm.
2 2
3 include ../Makefile.global 3 include ../Makefile.global
4 4
5 OTHER = Makefile init.debian init.slackware 5 OTHER = Makefile rc.slackware default
6 6
7 ############################################################################# 7 #############################################################################
8 8
9 .c.o: 9 .c.o:
10 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< 10 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
14 14
15 clean: 15 clean:
16 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak 16 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
17 17
18 install: 18 install:
19 @if [ -x /lib/systemd/systemd ]; then \ 19 mkdir -p ${DESTDIR}/etc/rc.d ${DESTDIR}/etc/default
20 mkdir -p ${DESTDIR}/etc/init.d ; \ 20 ${INSTALL} -c -g root -o root -m 0755 rc.slackware ${DESTDIR}/etc/rc.d/rc.thermferm
21 ${INSTALL} -c -g root -o root -m 0755 init.debian ${DESTDIR}/etc/init.d/thermferm ; \ 21 ${INSTALL} -c -g root -o root -m 0644 default ${DESTDIR}/etc/default/thermferm
22 echo "${INSTALL} -c -g root -o root -m 0755 init.debian ${DESTDIR}/etc/init.d/thermferm" ; \
23 [ -x /bin/systemctl ] && /bin/systemctl daemon-reload ; \
24 echo "[ -x /bin/systemctl ] && /bin/systemctl daemon-reload" ; \
25 elif [ -f /etc/slackware-version ]; then \
26 mkdir -p ${DESTDIR}/etc/rc.d ; \
27 ${INSTALL} -c -g root -o root -m 0755 init.slackware ${DESTDIR}/etc/rc.d/rc.thermferm ; \
28 echo "${INSTALL} -c -g root -o root -m 0755 init.slackware ${DESTDIR}/etc/rc.d/rc.thermferm" ; \
29 else \
30 echo "Unsupported distribution" ; \
31 fi
32 22
33 filelist: Makefile 23 filelist: Makefile
34 BASE=`pwd`; \ 24 BASE=`pwd`; \
35 BASE=`basename $${BASE}`; \ 25 BASE=`basename $${BASE}`; \
36 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist 26 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist

mercurial