1999-12-10 21:52:18 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
SRC?=/usr/src
|
|
|
|
|
2000-07-18 13:43:38 +00:00
|
|
|
COMMOBJ?= ${.OBJDIR}/../../common-obj
|
|
|
|
|
1999-12-10 21:52:18 +00:00
|
|
|
all: crunch
|
|
|
|
|
2000-07-18 13:43:38 +00:00
|
|
|
crunch1.conf: crunch.conf
|
|
|
|
@cat ${.ALLSRC} | sed -e "s@/usr/src@${SRC}@" > ${.TARGET}
|
|
|
|
|
|
|
|
crunch.mk: crunch1.conf crunch.inc
|
|
|
|
@crunchgen -h ${.CURDIR}/crunch.inc -m crunch.mk crunch1.conf
|
|
|
|
|
|
|
|
crunch1.mk: crunch.mk
|
|
|
|
@sed -e "s@make depend@make obj \&\& make depend@" \
|
2000-07-31 11:00:01 +00:00
|
|
|
-e "s@/usr/obj/@${COMMOBJ}@" crunch.mk > ${.TARGET}
|
2000-07-18 13:43:38 +00:00
|
|
|
|
|
|
|
crunch: crunch1.mk
|
2000-07-31 11:00:01 +00:00
|
|
|
@if [ ! -d build ]; then mkdir build; fi
|
2000-07-18 13:43:38 +00:00
|
|
|
@cp crunch1.c build/
|
|
|
|
@(cd build && env MAKEOBJDIRPREFIX=${COMMOBJ} \
|
|
|
|
${MAKE} -f ../crunch1.mk -DNOPAM all \
|
2001-04-03 13:34:35 +00:00
|
|
|
"CFLAGS=${CFLAGS} -DRELEASE_CRUNCH -DNOSECURE -DNOCRYPT") #2>&1 >/dev/null
|
1999-12-10 21:52:18 +00:00
|
|
|
|
|
|
|
clean:
|
2000-07-18 13:43:38 +00:00
|
|
|
rm -rf build
|
1999-12-10 21:52:18 +00:00
|
|
|
rm -f *.o *.stub *.lo *_stub.c *.mk \
|
|
|
|
crunch.cache \
|
|
|
|
crunch.mk \
|
|
|
|
crunch.c \
|
|
|
|
crunch1* \
|
|
|
|
crunch \
|
|
|
|
.tmp_* \
|
|
|
|
*~ \
|
|
|
|
*.gz
|
|
|
|
|
|
|
|
install:
|
1999-12-20 02:10:16 +00:00
|
|
|
rm -f ${MFS_MOUNTPOINT}/sbin/*
|
2000-07-18 13:43:38 +00:00
|
|
|
cp build/crunch1 ${MFS_MOUNTPOINT}/sbin/crunch
|
1999-12-20 02:10:16 +00:00
|
|
|
chmod 555 ${MFS_MOUNTPOINT}/sbin/crunch
|
1999-12-10 21:52:18 +00:00
|
|
|
for i in `crunchgen -l crunch1.conf` ; \
|
|
|
|
do \
|
1999-12-20 02:10:16 +00:00
|
|
|
ln ${MFS_MOUNTPOINT}/sbin/crunch ${MFS_MOUNTPOINT}/sbin/$${i}; \
|
1999-12-10 21:52:18 +00:00
|
|
|
done
|
1999-12-20 02:10:16 +00:00
|
|
|
rm ${MFS_MOUNTPOINT}/sbin/crunch
|
1999-12-10 21:52:18 +00:00
|
|
|
# Install the MIB files
|
|
|
|
#cp mibs/*.txt ${MFS_MOUNTPOINT}/usr/local/share/snmp/mibs/
|
|
|
|
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|