From 8eaff69d91445a494d8b1a387d5b96f1d669f74c Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 16 Jan 2001 11:25:23 +0000 Subject: Add first pass shared lib support into Makefile. This could use some refinement... --- Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 23a7046d2..e1bacc09c 100644 --- a/Makefile +++ b/Makefile @@ -31,13 +31,28 @@ include Rules.mak DIRS = misc pwd_grp stdio string termios unistd net signal stdlib sysdeps extra -all: libc.a +ifeq ($(HAS_MMU),true) + DO_SHARED=shared +endif + +all: libc.a $(DO_SHARED) done libc.a: halfclean headers subdirs + $(CROSS)ranlib libc.a + +# Surely there is a better way to do this then dumping all +# the objects into a tmp dir. Please -- someone enlighten me. +shared: libc.a + @rm -rf tmp + @mkdir tmp + @(cd tmp; ar -x ../libc.a) + $(CC) -s -nostdlib -shared -o libuClibc.so.1 -Wl,-soname,libuClibc.so.1 tmp/*.o + @rm -rf tmp + +done: libc.a $(DO_SHARED) @echo @echo Finally finished compiling... @echo - $(CROSS)ranlib libc.a halfclean: @rm -f libc.a @@ -66,6 +81,7 @@ tags: ctags -R clean: subdirs_clean + @rm -rf tmp rm -f libc.a libcrt0.o rm -f include/asm include/linux include/bits -- cgit v1.2.3