Add shared library version
This commit is contained in:
parent
e392e05c87
commit
724a31d3f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
libzel.a
|
||||
libzel.so
|
||||
*.o
|
||||
doc
|
||||
tests/itest_arithmetic
|
||||
|
8
Makefile
8
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
|
||||
|
Loading…
Reference in New Issue
Block a user