Эх сурвалжийг харах

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
Sergei Trofimovich 2 жил өмнө
parent
commit
2ed6486834
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      lib/Makefile

+ 2 - 2
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