openrc/src/rc/Makefile

65 lines
2.2 KiB
Makefile
Raw Normal View History

2008-01-07 15:09:44 +05:30
PROG= rc
SRCS= checkpath.c fstabinfo.c mountinfo.c rc.c rc-depend.c \
rc-logger.c rc-misc.c rc-plugin.c rc-status.c rc-update.c \
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
LDFLAGS+= -L../librc -L../libeinfo
2008-01-07 15:09:44 +05:30
LDADD+= -lutil -lrc -leinfo
CFLAGS+= -I../includes -I../librc -I../libeinfo
2008-01-06 02:19:48 +05:30
2008-01-07 15:09:44 +05:30
BINDIR?= /sbin
2008-01-06 02:19:48 +05:30
2008-01-09 17:14:43 +05:30
LINKDIR= ${LIBNAME}/${PROG}
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 \
shell_var
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-01-06 02:19:48 +05:30
MK= ../../mk
include ${MK}/os.mk
2008-01-09 17:14:43 +05:30
CFLAGS+= -DLIB=\"${LIBNAME}\"
include ${MK}/cc.mk
include ${MK}/prog.mk
2008-01-06 02:19:48 +05:30
include ${MK}/${MKTERMCAP}.mk
2008-01-07 15:09:44 +05:30
LDADD+= ${LIBDL} ${LIBKVM}
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:
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
install: all
2008-01-06 02:19:48 +05:30
${INSTALL} -d ${DESTDIR}${BINDIR}
${INSTALL} ${PROG} ${DESTDIR}${BINDIR}
2008-01-06 02:23:28 +05:30
${INSTALL} -d ${DESTDIR}/bin
2008-01-09 17:14:43 +05:30
for x in ${BINLINKS}; do ln -fs ${BINDIR}/${PROG} ${DESTDIR}/bin/$$x; done
2008-01-06 02:19:48 +05:30
${INSTALL} -d ${DESTDIR}/bin
for x in ${SBINLINKS}; do ln -fs ${PROG} ${DESTDIR}${BINDIR}/$$x; done
2008-01-09 17:14:43 +05:30
${INSTALL} -d ${DESTDIR}/${LIBNAME}/${PROG}/bin
for x in $(RC_BINLINKS); do ln -fs ${BINDIR}/${PROG} $(DESTDIR)/${LIBNAME}/${PROG}/bin/$$x; done
${INSTALL} -d ${DESTDIR}/${LIBNAME}/${PROG}/sbin
for x in ${RC_SBINLINKS}; do ln -fs ${BINDIR}/${PROG} ${DESTDIR}/${LIBNAME}/${PROG}/sbin/$$x; done
if test "${PAM}" = 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