# 
# 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 $<

all:	client1 client2 cl
.PHONY: all dep clean

client1: crt0.o puts.o client1.o -lpico
	$(LD) -Ttext 0 -o $@ $^
client2: crt0.o puts.o client2.o -lpico
	$(LD) -Ttext 0 -o $@ $^
cl: crt0.o puts.o cl.o -lpico
	$(LD) -Ttext 0 -o $@ $^

client1.o : client.c
	$(CC) -c -o $@ -DCOLMN=0 $^
client2.o : client.c
	$(CC) -c -o $@ -DCOLMN=30 $^

clean:
	rm -f *.[oas]
	rm -f client1 client2 cl
dep:
	$(CPP) -M *.c > depend

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