Skip to content

Commit 3184536

Browse files
authored
Makefile: separate the target to create empty dummy libraries (WebAssembly#502)
* 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
1 parent acd0a6e commit 3184536

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,14 +780,16 @@ endif
780780

781781
libc: include_dirs $(STATIC_LIBS)
782782

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

792+
finish: startup_files libc dummy_libs
791793
#
792794
# The build succeeded! The generated sysroot is in $(SYSROOT).
793795
#
@@ -984,4 +986,4 @@ clean:
984986
$(RM) -r "$(OBJDIR)"
985987
$(RM) -r "$(SYSROOT)"
986988

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

0 commit comments

Comments
 (0)