From: Michel Pollet Date: Mon, 21 Feb 2011 18:01:17 +0000 (+0000) Subject: Makefiles: Some fixups X-Git-Tag: v1.0a7~33 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=049b3be858177cc8efac9a36940d56470265ddf6;p=sx%2Fsimavr.git Makefiles: Some fixups + add -fPIC to -shared for the shared library + .axf rule try to comoile all dependencies Signed-off-by: Michel Pollet --- 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