#Install Library in /usr/lib for kernel 2.4.x
K_VERSION:=$(shell uname -r | cut -c1-3 | sed 's/2\.[56]/2\.6/')

ifeq ($(K_VERSION), 2.6)
  lib_dir := 2.6.x
else
  lib_dir := 2.4.x
  $(error This BSP is not supported on kernel 2.4.x)
endif

all:
	cp ./lib/$(lib_dir)/librb103.so.1.0.0 /usr/lib/ ; \
	cd /usr/lib ; \
	ln -s librb103.so.1.0.0 librb103.so.0 ; \
	ln -s librb103.so.0 librb103.so

clean:
	cd /usr/lib ; \
	rm -f librb103.*
