# WilsonWebs - Generate n-Loop Wilson webs
# See LICENSE file for copyright and license details.
include config.mk
SRC = webs.c util.c
OBJ = ${SRC:.c=.o}
all: options webs
options:
@echo WilsonWebs build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
config.h:
cp config.def.h $@
webs: ${OBJ}
${CC} -o WilsonWebs ${OBJ} ${LDFLAGS}
clean:
rm -f WilsonWebs ${OBJ}
dist: clean
mkdir -p WilsonWebs-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
WilsonWebs.1 WilsonWebs.h util.h ${SRC} WilsonWebs-${VERSION}
tar -cf WilsonWebs-${VERSION}.tar WilsonWebs-${VERSION}
gzip WilsonWebs-${VERSION}.tar
rm -rf WilsonWebs-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f WilsonWebs ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/WilsonWebs
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < WilsonWebs.1 > ${DESTDIR}${MANPREFIX}/man1/WilsonWebs.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/WilsonWebs.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/WilsonWebs\
${DESTDIR}${MANPREFIX}/man1/WilsonWebs.1
.PHONY: all options clean dist install uninstall