96 lines
3.5 KiB
Makefile
96 lines
3.5 KiB
Makefile
# Makefile for mbtask.
|
|
# Copyright (c) 1997-2001 by M. Broek.
|
|
# $Id$
|
|
|
|
include ../Makefile.global
|
|
|
|
SRCS = callstat.c nodelist.c scanout.c taskcomm.c taskinfo.c taskstat.c \
|
|
mbtask.c outstat.c signame.c taskdisk.c taskregs.c taskutil.c \
|
|
ports.c calllist.c ping.c
|
|
HDRS = callstat.h mbtask.h outstat.h signame.h taskdisk.h taskregs.h taskutil.h \
|
|
libs.h nodelist.h scanout.h taskcomm.h taskinfo.h taskstat.h \
|
|
ports.h calllist.h ping.h
|
|
OBJS = callstat.o nodelist.o scanout.o taskcomm.o taskinfo.o taskstat.o \
|
|
mbtask.o outstat.o signame.o taskdisk.o taskregs.o taskutil.o \
|
|
ports.o calllist.o ping.o
|
|
OTHER = Makefile issue issue.netbsd
|
|
|
|
#############################################################################
|
|
|
|
.c.o:
|
|
${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
|
|
|
|
all: mbtask
|
|
|
|
mbtask: ${OBJS} ${LIBS}
|
|
${CC} -o mbtask ${OBJS} ${LIBS}
|
|
strip mbtask
|
|
|
|
clean:
|
|
rm -f mbtask *.o *.h~ *.c~ version.* core filelist Makefile.bak
|
|
|
|
install: all
|
|
@if [ "`id -un`" != "root" ] ; then \
|
|
echo; echo " Must be root to install!"; echo; exit 3; \
|
|
fi
|
|
${INSTALL} -c -s -o `id -un` -g `id -gn` -m 6711 mbtask ${BINDIR}
|
|
@if [ -f ${ETCDIR}/mbsed.conf ]; then \
|
|
rm ${ETCDIR}/mbsed.conf ; \
|
|
fi
|
|
@if [ -f ${ETCDIR}/client.conf ]; then \
|
|
rm ${ETCDIR}/client.conf ; \
|
|
fi
|
|
@if [ -f ${BINDIR}/mbsed ]; then \
|
|
rm ${BINDIR}/mbsed ; \
|
|
fi
|
|
@if [ ! -f ${ETCDIR}/issue ]; then \
|
|
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 issue ${ETCDIR} ; \
|
|
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 issue ${ETCDIR}"; \
|
|
fi
|
|
|
|
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
|
|
callstat.o: libs.h ../lib/structs.h taskutil.h callstat.h
|
|
nodelist.o: libs.h ../lib/structs.h taskutil.h nodelist.h
|
|
scanout.o: libs.h ../lib/structs.h taskutil.h scanout.h
|
|
taskcomm.o: libs.h ../lib/structs.h taskstat.h taskregs.h taskdisk.h taskinfo.h taskutil.h taskcomm.h
|
|
taskinfo.o: libs.h ../lib/structs.h taskinfo.h
|
|
taskstat.o: libs.h ../lib/structs.h taskstat.h callstat.h outstat.h taskutil.h
|
|
mbtask.o: libs.h ../lib/structs.h signame.h taskstat.h taskutil.h taskregs.h taskcomm.h callstat.h outstat.h nodelist.h ports.h calllist.h ping.h mbtask.h
|
|
outstat.o: libs.h ../lib/structs.h taskutil.h taskstat.h scanout.h nodelist.h callstat.h outstat.h
|
|
signame.o: signame.h
|
|
taskdisk.o: libs.h ../lib/structs.h taskdisk.h taskutil.h
|
|
taskregs.o: libs.h ../lib/structs.h taskstat.h taskregs.h taskutil.h
|
|
taskutil.o: libs.h ../lib/structs.h signame.h scanout.h taskutil.h
|
|
ports.o: libs.h ../lib/structs.h taskutil.h nodelist.h ports.h
|
|
calllist.o: libs.h ../lib/structs.h taskstat.h taskutil.h callstat.h outstat.h mbtask.h ports.h calllist.h
|
|
ping.o: libs.h ../lib/structs.h taskstat.h taskutil.h ping.h
|
|
# End of generated dependencies
|