diff --git a/.gitignore b/.gitignore index e49dc79..a6f9def 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ libzel.a +libzel.so *.o doc tests/itest_arithmetic diff --git a/Makefile b/Makefile index 4c80c52..60560d3 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -CPPFLAGS += -I. -Iinclude +CPPFLAGS += -I. -Iinclude -fPIC CFLAGS += -O3 package := zel @@ -65,12 +65,15 @@ dist_source := z80.c \ .PHONY: all check clean distclean mostlyclean maintainer-clean dist distcheck doc-clean \ install install-html install-pdf html pdf uninstall uninstall-doc install-doc installcheck -all: libzel.a +all: libzel.a libzel.so libzel.a: z80.o z80_instructions.o $(AR) -cr $@ $? ranlib $@ +libzel.so: z80.o z80_instructions.o + gcc -shared -o $@ $? + tables/%.tab: tables/%.spec tables/gen.pl perl tables/gen.pl $< > $@ @@ -137,6 +140,7 @@ man: doc install: $(INSTALL) -d $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) libzel.a $(DESTDIR)$(libdir) + $(INSTALL_PROGRAM) libzel.so $(DESTDIR)$(libdir) $(INSTALL) -d $(DESTDIR)$(includedir)/zel $(INSTALL_DATA) include/zel/z80.h $(DESTDIR)$(includedir)/zel $(INSTALL_DATA) include/zel/z80_instructions.h $(DESTDIR)$(includedir)/zel