all: installed

VER = 1.0.3
TARBALL       = build/cminpack-$(VER).tar.gz
TARBALL_URL   = http://pr.willowgarage.com/downloads/cminpack-$(VER).tar.gz
UNPACK_CMD    = tar xfz
SOURCE_DIR    = build/cminpack-$(VER)
TARBALL_PATCH = fPIC.patch shared.patch
MD5SUM_FILE   = cminpack-$(VER).tar.gz.md5sum

include $(shell rospack find mk)/download_unpack_build.mk

installed: $(SOURCE_DIR)/unpacked Makefile
	echo "Building CMinpack..."
	cd $(SOURCE_DIR) && make
	mkdir -p include lib
	cp $(SOURCE_DIR)/*.h include
	cp $(SOURCE_DIR)/libminpack.so lib
	touch installed
clean: wipe
wipe:
	rm -rf build installed
