Disabled for non linux platform, as it need more work
than just a gcc -shared
Author: Martin Glueck <martin@mangari.org>
Edit: Michel Pollet <buserror@gmail.com>
IPATH += /opt/local/include
LFLAGS = -L/opt/local/lib/
-all: obj libsimavr.a ${target}
+all: obj libsimavr.a
+# shared library won't work that easily on non-linux
+ifeq (${shell uname}, Linux)
+all: libsimavr.so
+endif
+all: ${target}
obj/sim_%.o : cores/sim_%.c
@gcc $(CFLAGS) -MD \
@ar cru $@ $^
@ranlib $@
+libsimavr.so : ${cores_o}
+libsimavr.so : ${sim_o}
+ @echo gcc -shared $@
+ gcc -shared -o $@ $(LFLAGS) $^ $(LDFLAGS)
+
${target} : libsimavr.a
${target} : obj/${target}.o
@gcc $(CFLAGS) $(LFLAGS) \