From 049b3be858177cc8efac9a36940d56470265ddf6 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Mon, 21 Feb 2011 18:01:17 +0000 Subject: [PATCH] Makefiles: Some fixups + add -fPIC to -shared for the shared library + .axf rule try to comoile all dependencies Signed-off-by: Michel Pollet --- Makefile.common | 2 +- simavr/Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.common b/Makefile.common index 91000cb..e9fabcc 100644 --- a/Makefile.common +++ b/Makefile.common @@ -65,7 +65,7 @@ endif -Wl,--relax,--gc-sections \ -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \ -I../include -I../../include \ - ${<} -o ${@} + ${^} -o ${@} @${AVR}size ${@}|sed '1d' OBJ = obj diff --git a/simavr/Makefile b/simavr/Makefile index 69bfd7c..c147f2b 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -58,10 +58,10 @@ libsimavr.a : ${sim_o} @ar cru $@ $^ @ranlib $@ -libsimavr.so : ${cores_o} -libsimavr.so : ${sim_o} - @echo gcc -shared $@ - gcc -shared -o $@ $(LFLAGS) $^ $(LDFLAGS) +libsimavr.so : ${cores_o} +libsimavr.so : ${sim_o} + @echo LD $@ + @gcc -shared -fPIC -o $@ $(LFLAGS) $^ $(LDFLAGS) ${target} : libsimavr.a ${target} : obj/${target}.o @@ -71,4 +71,4 @@ ${target} : obj/${target}.o @echo LD $@ clean: - rm -rf ${target} obj *.a + rm -rf ${target} obj *.a *.so -- 2.39.5