#  GNU Makefile for SHARC code downloader
#
#  (C) 1998 PinPoint Corporation
#  This software is available for unlimited personal use and may only
#  be redistributed in unmodified form.  Above all, this notice may
#  not be modified or removed.
#  Contact tim.wall@pinpointco.com for commercial use
#
#  Targets:
#  dl		code to download COFF to the DSP
#	
.SUFFIXES: .asm
.c.asm:
	$(CC) -S $(CFLAGS) -o $@ -c $<

# Use this if you want HW handshaking on the serial port
#CFLAGS=-g -Wall -O2 -DHW_HANDSHAKE
# Otherwise, leave it out
CFLAGS=-Wall -O2

CC=gcc
OBJS=lserial.o coff.o unix_key.o
ALLFILES = dl.c lserial.c serial.h \
           Makefile coff21k.h coff.c 

TARGETS=dl

all: $(TARGETS) 

dl: dl.o $(OBJS) 
	gcc -o $@ $@.o $(OBJS) #libkb.a

checkin:
	ci -u $(ALLFILES)

tag:
	@if [ "$(TAG)" = "" ]; then \
	  echo "Please specify the RCS tag, i.e. TAG=<tagname>"; exit 1; \
	else \
	  rcs -N$(TAG): $(ALLFILES); \
	fi

clean:
	$(RM) *.o $(TARGETS)

#EOF