2001-01-15 02:28:46 +00:00
|
|
|
#------------------------------------------------------------------------
|
2000-08-05 05:12:50 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2001-01-15 02:28:46 +00:00
|
|
|
|
|
|
|
TARGET = avrprog
|
|
|
|
|
|
|
|
PREFIX ?= /usr/local
|
|
|
|
BINDIR = ${PREFIX}/bin
|
2001-01-20 04:28:49 +00:00
|
|
|
MANDIR = ${PREFIX}/man/man1
|
|
|
|
MANUAL = avrprog.1
|
2001-04-25 22:35:14 +00:00
|
|
|
DOCDIR = ${PREFIX}/share/doc/avrprog
|
2001-09-19 17:04:25 +00:00
|
|
|
CONFIGDIR = ${PREFIX}/etc
|
2001-04-25 22:35:14 +00:00
|
|
|
|
2001-09-19 17:04:25 +00:00
|
|
|
DIRS = ${BINDIR} ${MANDIR} ${DOCDIR} ${CONFIGDIR}
|
2001-01-15 02:28:46 +00:00
|
|
|
|
|
|
|
INSTALL = /usr/bin/install -c -o root -g wheel
|
2000-08-05 05:12:50 +00:00
|
|
|
|
2001-10-01 16:58:03 +00:00
|
|
|
CFLAGS += -g -Wall --pedantic -DCONFIG_DIR=\"${CONFIGDIR}\"
|
2001-01-19 02:46:50 +00:00
|
|
|
|
|
|
|
LDFLAGS =
|
2000-08-05 05:12:50 +00:00
|
|
|
|
2001-01-15 02:28:46 +00:00
|
|
|
INSTALL_PROGRAM = ${INSTALL} -m 555 -s
|
|
|
|
INSTALL_DATA = ${INSTALL} -m 444
|
|
|
|
INSTALL_MANUAL = ${INSTALL_DATA}
|
2000-08-06 03:53:06 +00:00
|
|
|
|
2000-08-05 05:12:50 +00:00
|
|
|
|
2001-01-19 02:46:50 +00:00
|
|
|
LIBS = -lreadline
|
|
|
|
|
2001-02-25 17:39:58 +00:00
|
|
|
.include "Makefile.inc"
|
|
|
|
|
|
|
|
all :
|
|
|
|
make depend
|
|
|
|
make ${TARGET}
|
2000-08-05 05:12:50 +00:00
|
|
|
|
2001-01-20 04:28:49 +00:00
|
|
|
${TARGET} : ${OBJS}
|
|
|
|
${CC} ${LDFLAGS} -o ${TARGET} ${OBJS} ${LIBS}
|
2001-01-19 02:46:50 +00:00
|
|
|
|
2000-08-05 05:12:50 +00:00
|
|
|
clean :
|
2001-01-20 04:28:49 +00:00
|
|
|
rm -f *~ *.core ${TARGET} *.o
|
2000-08-05 05:12:50 +00:00
|
|
|
|
2001-09-19 17:04:25 +00:00
|
|
|
install : dirs \
|
|
|
|
${BINDIR}/${TARGET} \
|
|
|
|
${MANDIR}/${MANUAL} \
|
|
|
|
${DOCDIR}/avrprog.pdf \
|
|
|
|
${CONFIGDIR}/avrprog.conf.sample
|
2001-04-25 22:35:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
dirs :
|
|
|
|
@for dir in ${DIRS}; do \
|
|
|
|
if [ ! -d $$dir ]; then \
|
|
|
|
echo "creating directory $$dir"; \
|
|
|
|
mkdir -p $$dir; \
|
|
|
|
fi \
|
|
|
|
done
|
2000-08-06 03:53:06 +00:00
|
|
|
|
2001-01-20 04:28:49 +00:00
|
|
|
${BINDIR}/${TARGET} : ${TARGET}
|
2001-09-19 17:04:25 +00:00
|
|
|
${INSTALL_PROGRAM} ${TARGET} $@
|
2001-01-20 04:28:49 +00:00
|
|
|
|
2001-01-22 14:32:23 +00:00
|
|
|
${MANDIR}/${MANUAL} : ${MANUAL}
|
2001-09-19 17:04:25 +00:00
|
|
|
${INSTALL_MANUAL} ${MANUAL} $@
|
2000-08-06 03:53:06 +00:00
|
|
|
|
2001-09-19 17:04:25 +00:00
|
|
|
${DOCDIR}/avrprog.pdf : avrprog.pdf
|
|
|
|
${INSTALL_DATA} avrprog.pdf $@
|
|
|
|
|
|
|
|
${CONFIGDIR}/avrprog.conf.sample : avrprog.conf.sample
|
|
|
|
${INSTALL_DATA} avrprog.conf.sample $@
|
2001-04-25 22:35:14 +00:00
|
|
|
|