diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-01-16 11:25:23 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-01-16 11:25:23 +0000 |
commit | 8eaff69d91445a494d8b1a387d5b96f1d669f74c (patch) | |
tree | 49c3bc5a5377b3e6fa89a2f1bfe01fcad387959f /Makefile | |
parent | 5354f1ab0c1e6da8efd212e674c85c31e1d719e3 (diff) |
Add first pass shared lib support into Makefile.
This could use some refinement...
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -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 |