Fix parallel build race condition in Makefile.windows
With -jN, make started third-party and fftw targets in parallel. libspecbleach depended on FFTW_HEADER which has no explicit rule (it is a side effect of make install), causing 'No rule to make target'. Object compilation also could start before FFTW headers were ready. Fix: depend on FFTW_LIB_D (has an explicit rule) instead of FFTW_HEADER, and add FFTW_LIB_D as order-only prerequisite for .o compilation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
02926b36ce
commit
69ea631daa
@ -177,7 +177,7 @@ third_party/rnnoise/librnnoise.a:
|
||||
# libspecbleach/Makefile жёстко вызывает pkg-config через FFTWINCLUDE=`...`
|
||||
# и использует результат только в CFLAGS?= — переопределяем CFLAGS целиком,
|
||||
# чтобы обойти pkg-config и прописать путь к нашему FFTW вручную.
|
||||
third_party/libspecbleach/libspecbleach.a: $(FFTW_HEADER)
|
||||
third_party/libspecbleach/libspecbleach.a: $(FFTW_LIB_D)
|
||||
@echo ">>> Собираем libspecbleach для Windows..."
|
||||
$(MAKE) -C third_party/libspecbleach \
|
||||
CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" \
|
||||
@ -215,7 +215,7 @@ $(STATIC_LIB): $(OBJS) | $(OUTDIR)
|
||||
@echo " $(STATIC_LIB) $(NR34_DEPS)"
|
||||
@echo " -L$(FFTW_INST)/lib -lfftw3 -lfftw3f -lavrt -lm"
|
||||
|
||||
$(OBJDIR)/%.o: %.c | $(OBJDIR)
|
||||
$(OBJDIR)/%.o: %.c | $(OBJDIR) $(FFTW_LIB_D)
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
# ── Очистка ───────────────────────────────────────────────────────────────────
|
||||
|
||||
Loading…
Reference in New Issue
Block a user