2008-01-07 15:09:44 +05:30
|
|
|
PROG= rc
|
2008-01-14 19:54:20 +05:30
|
|
|
SRCS= checkpath.c fstabinfo.c mountinfo.c \
|
|
|
|
rc-applets.c rc-depend.c rc-logger.c \
|
|
|
|
rc-misc.c rc-plugin.c rc-status.c rc-update.c rc.c \
|
2008-01-07 15:09:44 +05:30
|
|
|
runscript.c start-stop-daemon.c
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-01-07 15:09:44 +05:30
|
|
|
CLEANFILES= version.h
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-02-28 16:38:49 +05:30
|
|
|
BINDIR= ${PREFIX}/bin
|
|
|
|
SBINDIR= ${PREFIX}/sbin
|
|
|
|
LINKDIR= ${PREFIX}/${LIBNAME}/${PROG}
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-01-07 15:09:44 +05:30
|
|
|
BINLINKS= rc-status
|
|
|
|
SBINLINKS= rc-update runscript start-stop-daemon
|
2008-01-06 02:19:48 +05:30
|
|
|
RC_BINLINKS= einfon einfo ewarnn ewarn eerrorn eerror ebegin eend ewend \
|
2008-01-07 15:09:44 +05:30
|
|
|
eindent eoutdent esyslog eval_ecolors \
|
|
|
|
veinfo vewarn vebegin veend vewend veindent veoutdent \
|
|
|
|
service_starting service_started \
|
|
|
|
service_stopping service_stopped \
|
|
|
|
service_inactive service_wasinactive \
|
|
|
|
service_coldplugged service_started_daemon \
|
|
|
|
checkpath fstabinfo mountinfo rc-depend \
|
|
|
|
service_get_value service_set_value get_options save_options \
|
2008-01-14 13:42:37 +05:30
|
|
|
shell_var is_newer_than is_older_than
|
2008-01-06 02:19:48 +05:30
|
|
|
RC_SBINLINKS= mark_service_starting mark_service_started \
|
2008-01-07 15:09:44 +05:30
|
|
|
mark_service_stopping mark_service_stopped \
|
|
|
|
mark_service_inactive mark_service_wasinactive \
|
|
|
|
mark_service_coldplugged mark_service_failed \
|
|
|
|
rc-abort
|
2008-03-03 18:34:08 +05:30
|
|
|
ALL_LINKS= ${BINLINKS} ${SBINLINKS} ${RC_BINLINKS} ${RC_SBINLINKS}
|
|
|
|
CLEANFILES+= ${ALL_LINKS}
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-02-02 18:30:01 +05:30
|
|
|
LDFLAGS+= -L../librc -L../libeinfo
|
2008-03-11 19:09:20 +05:30
|
|
|
LDFLAGS+= -Wl,--rpath=../librc -Wl,--rpath=../libeinfo
|
2008-02-02 18:30:01 +05:30
|
|
|
LDADD+= -lutil -lrc -leinfo
|
|
|
|
|
2008-01-10 22:05:59 +05:30
|
|
|
MK= ../../mk
|
|
|
|
include ${MK}/cc.mk
|
2008-01-30 20:30:58 +05:30
|
|
|
include ${MK}/os.mk
|
2008-01-10 22:05:59 +05:30
|
|
|
include ${MK}/prog.mk
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-01-30 20:30:58 +05:30
|
|
|
CFLAGS+= -I../includes -I../librc -I../libeinfo
|
|
|
|
CFLAGS+= -DLIB=\"${LIBNAME}\"
|
2008-03-05 17:57:11 +05:30
|
|
|
CFLAGS+= -DSYSCONFDIR=\"${SYSCONFDIR}\"
|
2008-01-30 20:30:58 +05:30
|
|
|
|
2008-01-13 02:08:57 +05:30
|
|
|
include ${MK}/${MKTERMCAP}.mk
|
2008-01-07 15:09:44 +05:30
|
|
|
LDADD+= ${LIBDL} ${LIBKVM}
|
2008-01-13 02:08:57 +05:30
|
|
|
include ${MK}/${MKPAM}.mk
|
2008-01-06 02:19:48 +05:30
|
|
|
|
2008-01-09 17:14:43 +05:30
|
|
|
${SRCS}: version.h
|
2008-01-06 02:19:48 +05:30
|
|
|
version.h:
|
2008-01-10 22:05:59 +05:30
|
|
|
sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1\"/p' ../../Makefile > version.h
|
2008-01-06 02:19:48 +05:30
|
|
|
if test -n "${BRANDING}"; then \
|
|
|
|
echo "#define BRANDING \"${BRANDING}\"" >> version.h; \
|
|
|
|
fi
|
|
|
|
|
2008-01-07 01:22:43 +05:30
|
|
|
install: all
|
2008-02-28 16:38:49 +05:30
|
|
|
${INSTALL} -d ${DESTDIR}${SBINDIR}
|
|
|
|
${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR}
|
2008-01-06 02:19:48 +05:30
|
|
|
${INSTALL} -d ${DESTDIR}${BINDIR}
|
2008-02-28 16:38:49 +05:30
|
|
|
for x in ${BINLINKS}; do ln -fs ${DESTDIR}${SBINDIR}/${PROG} ${DESTDIR}${BINDIR}/$$x; done
|
|
|
|
${INSTALL} -d ${DESTDIR}${SBINDIR}
|
|
|
|
for x in ${SBINLINKS}; do ln -fs ${PROG} ${DESTDIR}${SBINDIR}/$$x; done
|
|
|
|
${INSTALL} -d ${DESTDIR}${LINKDIR}/bin
|
|
|
|
for x in $(RC_BINLINKS); do ln -fs ${DESTDIR}${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/bin/$$x; done
|
|
|
|
${INSTALL} -d ${DESTDIR}${LINKDIR}/sbin
|
|
|
|
for x in ${RC_SBINLINKS}; do ln -fs ${DESTDIR}${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/sbin/$$x; done
|
2008-01-13 15:51:22 +05:30
|
|
|
if test "${MKPAM}" = pam; then \
|
2008-01-06 02:24:34 +05:30
|
|
|
${INSTALL} -d ${DESTDIR}${PAMDIR}; \
|
2008-01-09 17:14:43 +05:30
|
|
|
${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
|
2008-01-06 02:19:48 +05:30
|
|
|
fi
|
2008-01-14 11:02:39 +05:30
|
|
|
|
|
|
|
links: rc
|
2008-03-03 18:34:08 +05:30
|
|
|
for l in ${ALL_LINKS}; do ln -sf rc $$l || exit $$? ; done
|