From 2ed6486834634130fe7bc9b8803b0113767fc7c1 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 22 Jun 2022 23:00:44 +0100 Subject: [PATCH] lib/Makefile: add .o file dependency on libsubdirs targets Without the change there is no guarantee that .o files will be built after directories are created for them and build fails as: gcc -I/build/gnu-efi-code//lib ... -c lib/runtime/rtstr.c -o runtime/rtstr.o Assembler messages: Fatal error: can't create runtime/rtstr.o: No such file or directory --- lib/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index cf4239d..1fc6a47 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -74,6 +74,8 @@ all: libsubdirs libefi.a libsubdirs: for sdir in $(SUBDIRS); do mkdir -p $$sdir; done +$(OBJS): libsubdirs + libefi.a: $(OBJS) $(AR) $(ARFLAGS) $@ $^ @@ -89,5 +91,3 @@ $(LIBDIRINSTALL)/libefi.a: libefi.a | $(LIBDIRINSTALL) install: $(LIBDIRINSTALL)/libefi.a include $(SRCDIR)/../Make.rules - -.PHONY: libsubdirs