PWD=$(shell pwd)
LIBNAME=lib$(shell basename ${PWD})

CC=${CROSSTOOL}gcc
LD=${CROSSTOOL}ld
AS=${CROSSTOOL}as
AR=${CROSSTOOL}ar

all: liba
	@rm -f *.o

libso:
	${CC} -fPIC -shared *.c -o ${LIBNAME}.so

liba:
	${CC} -c *.c
	${AR} -rcs ${LIBNAME}.a *.o

clean:
	rm -f ${LIBNAME}.*

distclean: clean
	rm -f *.o
