Commit 049b3be858177cc8efac9a36940d56470265ddf6
authorMichel Pollet <buserror@gmail.com>
Mon, 21 Feb 2011 18:01:17 +0000 (18:01 +0000)
committerMichel Pollet <buserror@gmail.com>
Mon, 21 Feb 2011 18:01:17 +0000 (18:01 +0000)
+ add -fPIC to -shared for the shared library
+ .axf rule try to comoile all dependencies

Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
Makefile.common
simavr/Makefile

index 91000cb7e14295a5bdda11c36a4fa066e2acaac4..e9fabcc9e83b27f9facaa16363794b2e4f580d1e 100644 (file)
@@ -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
index 69bfd7c66735c4bf9c62ac38f1839a3da37b70ae..c147f2b0920af36d91928c68db79e418dabc14ec 100644 (file)
@@ -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