diff --git a/makefile b/makefile index fb1df830..1a74d60c 100644 --- a/makefile +++ b/makefile @@ -53,6 +53,8 @@ else endif install-linux: + $(SUDO) mkdir -p /usr/local/share/libpostal + $(SUDO) chown -R $(USER):$$(id -gn) /usr/local/share/libpostal @$(MAKE) install-libpostal install-macos: @@ -62,6 +64,8 @@ ifeq ($(ARCH),arm64) else @echo "Intel architecture detected. SSE2 optimizations will be enabled." endif + $(SUDO) mkdir -p /usr/local/share/libpostal + $(SUDO) chown -R $(USER):$$(id -gn) /usr/local/share/libpostal @$(MAKE) install-libpostal install-windows: @@ -72,16 +76,16 @@ install-libpostal: @echo "Cloning libpostal repository..." git clone https://github.com/openvenues/libpostal || true cd libpostal && \ + if [ "$(detected_OS)" = "Windows" ]; then \ + cp -rf windows/* ./ ; \ + fi && \ ./bootstrap.sh && \ ./configure $(CONFIGURE_FLAGS) && \ make -j$(shell nproc || echo 4) && \ if [ "$(detected_OS)" = "Windows" ]; then \ - make install && \ - make download-models; \ + make install; \ else \ - $(SUDO) mkdir -p /usr/local/share/libpostal && \ - $(SUDO) make install && \ - $(SUDO) make download-models; \ + $(SUDO) make install; \ fi .PHONY: install install-linux install-macos install-windows install-libpostal