# 
# Makefile for libraries needed by PicOs development
#
# of these only mesg.c is custom; the other are the files from
# the Linux distribution.

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

OBJS	= mesg.o vsprintf.o ctype.o string.o 
SRVOBJ  = server.o # objects for the special server library

all:	libpico.a libsrv.a crt0.o
.PHONY: all dep clean

libpico.a:$(OBJS)
	rm -f pico.a
	$(AR) rcs $@ $^

libsrv.a:$(SRVOBJ)
	rm -f srv.a
	$(AR) rcs $@ $^

clean:
	rm -f *.[oas]

dep:
	$(CPP) -M *.c > depend

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