From e7671486aca402b6e85cc9b200263fde16ebbb9b Mon Sep 17 00:00:00 2001 From: John Tumminaro Date: Wed, 16 Sep 2026 11:09:33 -0600 Subject: [PATCH] src/Makefile: build lib before the other directories so make -jN works Every directory except lib links ../lib/libcom.a, but the top-level Makefile declared no dependency between the sub-directory targets, so a parallel top-level build (make -j8) started them all at once and utils, orbit, tedit, lsq, redig and arsig failed with "No rule to make target ../lib/libcom.a". install.sh runs a serial make and was not affected. Declaring that every other directory depends on lib restores the ordering while keeping the per-directory builds parallel. Verified with a clean make -j8 on Ubuntu 24.04 (gfortran 13) and on macOS (Darwin 27, Homebrew gfortran 16): all 11 executables build. --- src/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile b/src/Makefile index b8406bf..fd5e375 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,6 +6,10 @@ all : $(SUBDIR) $(SUBDIR) : make -j4 -C $@ +# Every other directory links ../lib/libcom.a, so a parallel top-level make +# (make -jN) must finish lib first. +$(filter-out lib,$(SUBDIR)) : lib + install : @mkdir -p ../bin/ mv arsig/arsig lsq/lsq tedit/tedit redig/redig orbit/sp3orb spp/spp otl/otl mhm/mhm \