tools/Makefile

changeset 612
452f79a5ad71
parent 559
2bcccc6976f9
child 633
8b84e73af50e
equal deleted inserted replaced
611:732d482f47c8 612:452f79a5ad71
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 #SRCS = $(wildcard *.c) 5 OTHER = Makefile init.debian init.slackware setup.slackware
6 #HDRS = $(wildcard *.h)
7 #OBJS = $(SRCS:.c=.o)
8 #SLIBS = -lpthread
9 #TARGET = thermferm
10 OTHER = Makefile thermferm.init
11 6
12 ############################################################################# 7 #############################################################################
13 8
14 .c.o: 9 .c.o:
15 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< 10 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
19 14
20 clean: 15 clean:
21 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak 16 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
22 17
23 install: 18 install:
24 ${INSTALL} -c -g root -o root -m 0755 thermferm.init /etc/init.d/thermferm 19 @if [ -x /lib/systemd/systemd ]; then \
25 [ -x /bin/systemctl ] && /bin/systemctl daemon-reload 20 ${INSTALL} -c -g root -o root -m 0755 init.debian /etc/init.d/thermferm ; \
21 echo "${INSTALL} -c -g root -o root -m 0755 init.debian /etc/init.d/thermferm" ; \
22 [ -x /bin/systemctl ] && /bin/systemctl daemon-reload ; \
23 echo "[ -x /bin/systemctl ] && /bin/systemctl daemon-reload" ; \
24 elif [ -f /etc/slackware-version ]; then \
25 ${INSTALL} -c -g root -o root -m 0755 init.slackware /etc/rc.d/init.d/thermferm ; \
26 echo "${INSTALL} -c -g root -o root -m 0755 init.slackware /etc/rc.d/init.d/thermferm" ; \
27 ${INSTALL} -c -g root -o root -m 0755 setup.slackware /var/lib/pkgtools/setup/setup.thermferm ; \
28 echo "${INSTALL} -c -g root -o root -m 0755 setup.slackware /var/lib/pkgtools/setup/setup.thermferm" ; \
29 else \
30 echo "Unsupported distribution" ; \
31 fi
26 32
27 filelist: Makefile 33 filelist: Makefile
28 BASE=`pwd`; \ 34 BASE=`pwd`; \
29 BASE=`basename $${BASE}`; \ 35 BASE=`basename $${BASE}`; \
30 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist 36 (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist

mercurial