This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/mbutils/Makefile
2004-11-05 20:41:08 +00:00

93 lines
3.1 KiB
Makefile

# Makefile for MBSE BBS under Linux
# Copyright (c) 1998, 2004 by M. Broek.
# $Id$
include ../Makefile.global
SRCS = mball.c mblang.c mbstat.c mbtoberep.c mbuser.c
HDRS = mball.h mbstat.h mbuser.h
MBALL_OBJS = mball.o
MBALL_LIBS = ../lib/libmbse.a ../lib/libdbase.a
MBLANG_OBJS = mblang.o
MBLANG_LIBS = ../lib/libmbse.a ../lib/libdbase.a
MBSTAT_OBJS = mbstat.o
MBSTAT_LIBS = ../lib/libmbse.a ../lib/libdbase.a
MBTOBE_OBJS = mbtoberep.o
MBTOBE_LIBS = ../lib/libmbse.a ../lib/libdbase.a
MBUSER_OBJS = mbuser.o
MBUSER_LIBS = ../lib/libmbse.a ../lib/libdbase.a
OTHER = Makefile
TARGET = mball mblang mbstat mbtoberep mbuser
#############################################################################################################
.c.o:
${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
all: ${TARGET}
clean:
rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
mball: ${MBALL_OBJS} ${MBALL_LIBS}
${CC} -o mball ${MBALL_OBJS} ${LDFLAGS} ${LIBS} ${MBALL_LIBS}
mblang: ${MBLANG_OBJS} ${MBLANG_LIBS}
${CC} -o mblang ${MBLANG_OBJS} ${LDFLAGS} ${LIBS} ${MBLANG_LIBS}
mbstat: ${MBSTAT_OBJS} ${MBSTAT_LIBS}
${CC} -o mbstat ${MBSTAT_OBJS} ${LDFLAGS} ${LIBS} ${MBSTAT_LIBS}
mbtoberep: ${MBTOBE_OBJS} ${MBTOBE_LIBS}
${CC} -o mbtoberep ${MBTOBE_OBJS} ${LDFLAGS} ${LIBS} ${MBTOBE_LIBS}
mbuser: ${MBUSER_OBJS} ${MBUSER_LIBS}
${CC} -o mbuser ${MBUSER_OBJS} ${LDFLAGS} ${LIBS} ${MBUSER_LIBS}
install: all
@if [ "`id -un`" != "root" ] ; then \
echo; echo " Must be root to install!"; echo; exit 3; \
fi
${INSTALL} -c -s -o ${OWNER} -g ${GROUP} -m 0700 mball ${BINDIR}
${INSTALL} -c -s -o ${OWNER} -g ${GROUP} -m 0700 mblang ${BINDIR}
${INSTALL} -c -s -o ${OWNER} -g ${GROUP} -m 0750 mbstat ${BINDIR}
${INSTALL} -c -s -o ${OWNER} -g ${GROUP} -m 0700 mbtoberep ${BINDIR}
${INSTALL} -c -s -o ${ROWNER} -g ${RGROUP} -m 6711 mbuser ${BINDIR}
@rm -f mbchat
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
mball.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h mball.h
mblang.o: ../config.h ../lib/mbselib.h
mbstat.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbstat.h
mbtoberep.o: ../config.h ../lib/mbselib.h
mbuser.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbuser.h
# End of generated dependencies