CC = mipsel-openwrt-linux-uclibc-gcc

PREFIX = /usr/local

LIBBD_PATH = $(PREFIX)/lib/libbbd

CFLAGS = -Wall -DLIBBD_PATH='"$(LIBBD_PATH)"'

MAIN = libbb.a libbbd

.PHONY:		all install uninstall clean spotless upload

all:		$(MAIN)

libbb.a:	libbb.o
		$(AR) cr $@ $^

libbb.o libbd:	libbb.h

install:	$(MAIN)
		install -D libbb.a $(PREFIX)/lib/
		install -D libbbd $(LIBBD_PATH)

uninstall:
		rm -f $(PREFIX)/lib/libbb.a
		rm -f $(LIBBD_PATH)

clean:
		rm -f libbb.o

spotless:	clean
		rm -f $(MAIN)

upload:		libbbd
		scp libbbd ben:/usr/local/lib/
