+ 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:
-Wl,--relax,--gc-sections \
-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \
-I../include -I../../include \
- ${<} -o ${@}
+ ${^} -o ${@}
@${AVR}size ${@}|sed '1d'
OBJ = obj
@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
@echo LD $@
clean:
- rm -rf ${target} obj *.a
+ rm -rf ${target} obj *.a *.so