--- Makefile 2026-04-09 03:51:25.000000000 +0800 +++ Makefile 2026-05-22 07:17:36.000000000 +0800 @@ -1,6 +1,6 @@ -LIBRARY ?= static -PREFIX ?= $(PWD)/dist +LIBRARY ?= shared +PREFIX ?= /opt/local XTRACT_VERSION := $(shell cat VERSION) HPATH = include/xtract @@ -34,8 +34,8 @@ install: $(MAKE) -C src install $(MAKE) -C examples install - mkdir -p $(PREFIX)/$(HPATH) - cp $(HPATH)/* $(PREFIX)/$(HPATH) + mkdir -p $(DESTDIR)$(PREFIX)/$(HPATH) + cp $(HPATH)/* $(DESTDIR)$(PREFIX)/$(HPATH) clean: @$(MAKE) -C src clean --- src/Makefile 2026-04-09 03:51:25.000000000 +0800 +++ src/Makefile 2026-05-22 07:22:47.000000000 +0800 @@ -25,9 +25,9 @@ # Flags to pass to the linker LDFLAGS ?= # Type of product to build: "shared" for a shared library, "static" for a static library, empty for standalone -LIBRARY ?= static +LIBRARY ?= shared # Prefix to the path that the "install" target will install into. libs to $(PREFIX)/lib, executables to $(PREFIX)/bin -PREFIX ?= /usr/local +PREFIX ?= /opt/local ############################################## ### Do not modify anything below this line ### @@ -93,8 +93,8 @@ @$(COMPILER) $(CXXFLAGS) $(FLAGS) -MMD -MP -fPIC -c $< -o $@ install: $(OUT) - @install -d $(INSTALL_DIR) - @install $(OUT) $(INSTALL_DIR) + @install -d $(DESTDIR)$(INSTALL_DIR) + @install $(OUT) $(DESTDIR)$(INSTALL_DIR) uninstall: @$(RM) $(INSTALL_DIR)/$(OUT)