# 
# Makefile for a prototype client

.S.s:
	$(CPP) -traditional $< -o $*.s
.c.s:
	$(CC) $(CFLAGS) -S $<
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) -c $<

OBJSK	= crt0.o key.o -lpico -lsrv
RESULTK = key
OBJSS	= crt0.o scan.o -lpico -lsrv
RESULTS = scan

all:	$(RESULTS) $(RESULTK)
.PHONY: all dep clean

$(RESULTK): $(OBJSK)
	$(LD) -Ttext 0 -o $@ $^ 
$(RESULTS): $(OBJSS)
	$(LD) -Ttext 0 -o $@ $^ 

clean:
	rm -f *.[oas]
	rm -f $(RESULTK) $(RESULTS)
dep:
	$(CPP) -M *.c > depend

ifeq (depend,$(wildcard depend))
include depend
endif
