# Makefile for srec2dfu.

#### Start of system configuration section. ####

CC = gcc
INSTALL = install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

exec_prefix = ${prefix}

CFLAGS = -O3 -Wall 

# Where the installed binary goes.
bindir = ${exec_prefix}/bin
binprefix = 

#### End of system configuration section. ####

SHELL = /bin/sh

# This rule allows us to supply the necessary -D options
# in addition to whatever the user asks for.

all:  srec2dfu

srec2dfu: srec2dfu.cpp Makefile image.o DFUFILE.o
	${CC} ${CFLAGS} $@.cpp -o $@ image.o DFUFILE.o -lstdc++

image.o:	image.cpp
	${CC} ${CFLAGS} -c -I. -o image.o image.cpp

DFUFILE.o:	DFUFILE.cpp
	${CC} ${CFLAGS} -c -I. -o DFUFILE.o DFUFILE.cpp

clean:
	rm -f *.o core srec2dfu

distclean: clean
	rm -f *.c~ Makefile~
