# Makefile for Todos Argos Mini
# Linux Serial Driver
# Implementation

CC   = gcc -DCPU_ICAP_PC=1
LD   = ld
OBJS = serial.o ifdhandler.o ctapi.o
LIBN = libslb_rf60.so

all: lib test

mostlyclean:
	-rm -f *.o test *.[ch]~ README*~ Makefile*~

clean: mostlyclean
	-rm -f *.so

lib: $(OBJS)
	$(LD) -shared $(OBJS) -o $(LIBN)

test: test.c $(OBJS)
	$(CC) -o test test.c $(OBJS)

ifdhandler.o: ifdhandler.h ifdhandler.c
	$(CC) -c ifdhandler.c

ctapi.o: ctapi.h
	$(CC) -c ctapi.c

scio.o: serial.h
	$(CC) -c serial.c
