mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
Prepare the Makefile for integration into the FreeBSD ports tree.
Fix a few "may be used uninitialized" bugs found by -Wall. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@33 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
31
Makefile
31
Makefile
@@ -1,23 +1,34 @@
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
|
||||
TARGET = avrprog
|
||||
TARGET = avrprog
|
||||
|
||||
DEST = ${HOME}/bin/0.${ARCH}
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR = ${PREFIX}/bin
|
||||
|
||||
all : ${TARGET}
|
||||
INSTALL = /usr/bin/install -c -o root -g wheel
|
||||
|
||||
CFLAGS = -Wall --pedantic -g
|
||||
CFLAGS += -Wall --pedantic
|
||||
|
||||
${TARGET} : avrprog.c
|
||||
${CC} ${CFLAGS} -o ${TARGET} avrprog.c
|
||||
INSTALL_PROGRAM = ${INSTALL} -m 555 -s
|
||||
INSTALL_DATA = ${INSTALL} -m 444
|
||||
INSTALL_MANUAL = ${INSTALL_DATA}
|
||||
|
||||
|
||||
all : $(TARGET)
|
||||
|
||||
$(TARGET) : avrprog.c
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $<
|
||||
|
||||
clean :
|
||||
rm -f *.o ${TARGET} *~
|
||||
rm -f *~ *.core $(TARGET)
|
||||
|
||||
install : ${DEST}/${TARGET}
|
||||
install : ${BINDIR}/$(TARGET)
|
||||
|
||||
${DEST}/${TARGET} : ${TARGET}
|
||||
cp -p ${TARGET} $@
|
||||
${BINDIR}/$(TARGET) : $(TARGET)
|
||||
${INSTALL_PROGRAM} $(TARGET) ${BINDIR}
|
||||
|
||||
|
Reference in New Issue
Block a user