2017-06-02 10:54:54 +03:00
|
|
|
# See LICENSE file for copyright and license details.
|
2005-12-19 16:39:54 +03:00
|
|
|
include config.mk
|
|
|
|
|
2017-06-02 10:54:54 +03:00
|
|
|
SRC = ii.c strlcpy.c
|
|
|
|
OBJ = ${SRC:.c=.o}
|
2005-12-19 16:39:54 +03:00
|
|
|
|
2017-06-02 10:54:54 +03:00
|
|
|
all: ii
|
2005-12-19 16:39:54 +03:00
|
|
|
|
|
|
|
options:
|
|
|
|
@echo ii build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
2017-06-02 10:54:54 +03:00
|
|
|
.o:
|
|
|
|
$(LD) -o $@ $< $(LDFLAGS)
|
2005-12-19 16:39:54 +03:00
|
|
|
|
2017-06-02 10:54:54 +03:00
|
|
|
.c.o:
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
2005-12-19 16:39:54 +03:00
|
|
|
|
|
|
|
ii: ${OBJ}
|
2017-06-02 10:54:54 +03:00
|
|
|
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
2005-12-19 16:39:54 +03:00
|
|
|
|
|
|
|
install: all
|
2017-06-02 10:54:54 +03:00
|
|
|
mkdir -p ${DESTDIR}${DOCDIR}
|
|
|
|
mkdir -p ${DESTDIR}${BINDIR}
|
|
|
|
mkdir -p ${DESTDIR}${MAN1DIR}
|
|
|
|
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MAN1DIR}
|
|
|
|
install -m 644 CHANGES README FAQ LICENSE ${DESTDIR}${DOCDIR}
|
|
|
|
install -m 775 ii ${DESTDIR}${BINDIR}
|
|
|
|
sed "s/VERSION/${VERSION}/g" < ii.1 > ${DESTDIR}${MAN1DIR}/ii.1
|
|
|
|
chmod 644 ${DESTDIR}${MAN1DIR}/ii.1
|
2005-12-19 16:39:54 +03:00
|
|
|
|
|
|
|
uninstall: all
|
2017-06-02 10:54:54 +03:00
|
|
|
rm -f ${DESTDIR}${MAN1DIR}/ii.1 \
|
|
|
|
${DESTDIR}${BINDIR}/ii
|
|
|
|
rm -rf ${DESTDIR}${DOCDIR}
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
mkdir -p ii-${VERSION}
|
|
|
|
cp -R Makefile CHANGES README FAQ LICENSE strlcpy.c arg.h \
|
|
|
|
config.mk ii.c ii.1 ii-${VERSION}
|
|
|
|
tar -cf ii-${VERSION}.tar ii-${VERSION}
|
|
|
|
gzip ii-${VERSION}.tar
|
|
|
|
rm -rf ii-${VERSION}
|
2005-12-19 16:39:54 +03:00
|
|
|
|
|
|
|
clean:
|
2017-06-02 10:54:54 +03:00
|
|
|
rm -f ii *.o
|