Skip to content

Commit

Permalink
Makefile: separate the target to create empty dummy libraries (#502)
Browse files Browse the repository at this point in the history
* Makefile: separate the target to create empty dummy libraries

During develompment, it's sometimes convenient to have a separate target.

* ensure to create the destination directory
  • Loading branch information
yamt committed May 30, 2024
1 parent acd0a6e commit 3184536
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -780,14 +780,16 @@ endif

libc: include_dirs $(STATIC_LIBS)

finish: startup_files libc
dummy_libs:
#
# Create empty placeholder libraries.
#
mkdir -p "$(SYSROOT_LIB)" && \
for name in m rt pthread crypt util xnet resolv; do \
$(AR) crs "$(SYSROOT_LIB)/lib$${name}.a"; \
done

finish: startup_files libc dummy_libs
#
# The build succeeded! The generated sysroot is in $(SYSROOT).
#
Expand Down Expand Up @@ -984,4 +986,4 @@ clean:
$(RM) -r "$(OBJDIR)"
$(RM) -r "$(SYSROOT)"

.PHONY: default startup_files libc libc_so finish install include_dirs clean check-symbols bindings
.PHONY: default startup_files libc libc_so dummy_libs finish install include_dirs clean check-symbols bindings

0 comments on commit 3184536

Please sign in to comment.