2001-11-03 21:43:44 +00:00
|
|
|
# Makefile for the mbsetup.
|
2001-11-03 22:45:03 +00:00
|
|
|
# Copyright (c) 1997-2001 by M. Broek.
|
|
|
|
# $Id$
|
2001-11-03 21:43:44 +00:00
|
|
|
|
|
|
|
include ../Makefile.global
|
|
|
|
|
|
|
|
SRCS = mutil.c mbmon.c common.c
|
|
|
|
HDRS = mutil.h mbmon.h common.h
|
|
|
|
OBJS = mutil.o mbmon.o common.o
|
|
|
|
LIBS += ../lib/libmemwatch.a
|
|
|
|
OTHER = Makefile
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
|
|
|
|
|
|
|
|
all: mbmon
|
|
|
|
|
|
|
|
|
|
|
|
mbmon: ${OBJS} ${LIBS}
|
|
|
|
${CC} -o mbmon ${OBJS} ${LIBS}
|
|
|
|
strip mbmon
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f mbmon *.o *.h~ *.c~ core filelist Makefile.bak
|
|
|
|
|
|
|
|
install: all
|
2001-12-20 21:52:13 +00:00
|
|
|
${INSTALL} -c -s -g ${GROUP} -o ${OWNER} -m ${MODE} mbmon ${BINDIR}
|
2001-11-03 21:43:44 +00:00
|
|
|
|
|
|
|
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
|
2002-10-20 20:58:55 +00:00
|
|
|
mutil.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mberrors.h common.h mutil.h
|
2002-06-30 12:48:44 +00:00
|
|
|
mbmon.o: ../config.h ../lib/libs.h ../lib/memwatch.h common.h mutil.h
|
2002-10-20 20:58:55 +00:00
|
|
|
common.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/mberrors.h common.h
|
2001-11-03 21:43:44 +00:00
|
|
|
# End of generated dependencies
|