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-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-01-19 02:46:50 +00:00
|
|
|
CFLAGS += -Wall --pedantic
|
|
|
|
|
|
|
|
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
|
|
|
OBJS = avr.o fileio.o main.o ppi.o term.o
|
|
|
|
LIBS = -lreadline
|
|
|
|
|
2001-01-20 04:28:49 +00:00
|
|
|
all : ${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
|
|
|
|
|
|
|
main.o : avr.h fileio.h ppi.h term.h
|
|
|
|
avr.o : avr.h ppi.h
|
|
|
|
fileio.o : fileio.h avr.h
|
|
|
|
ppi.o : ppi.h
|
|
|
|
term.o : term.h avr.h
|
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-01-20 04:28:49 +00:00
|
|
|
install : ${BINDIR}/${TARGET} ${MANDIR}/${MANUAL}.gz
|
2000-08-06 03:53:06 +00:00
|
|
|
|
2001-01-20 04:28:49 +00:00
|
|
|
${BINDIR}/${TARGET} : ${TARGET}
|
|
|
|
${INSTALL_PROGRAM} ${TARGET} ${BINDIR}
|
|
|
|
|
|
|
|
${MANDIR}/${MANUAL}.gz : ${MANUAL}
|
|
|
|
${INSTALL_MANUAL} ${MANUAL} ${MANDIR}
|
2001-01-22 01:59:47 +00:00
|
|
|
gzip -f ${MANDIR}/${MANUAL}
|
2000-08-06 03:53:06 +00:00
|
|
|
|