all: topo.json

build/ne_%_ocean.zip:
	mkdir -p build
	curl -o $@ --raw 'http://www.nacis.org/naturalearth/$*/physical/ne_$*_ocean.zip'

build/ne_%.shp: build/ne_%.zip
	unzip -d build $<
	touch $@

topo.json: build/ne_110m_ocean.shp
	node_modules/.bin/topojson \
		--no-force-clockwise \
		-q 1e5 \
		-- \
		ocean=build/ne_110m_ocean.shp \
		> $@
