logo

libbulletml

Library of Bullet Markup Language (forked from https://shinh.skr.jp/libbulletml/index_en.html )git clone https://hacktivis.me/git/libbulletml.git
commit: c83c8cc6578ae67ec316cd0f9a97f92871653227
parent 3e4833a2e7127bd4d9ff8717ed7fbdf0f13fbffc
Author: Miriam Ruiz <little_miry@yahoo.es>
Date:   Fri, 22 Mar 2024 22:11:16 +0100

src/Makefile: Apply 0.0.6-7.debian:patches/makefile.patch

Diffstat:

M.gitignore7+++++--
Msrc/Makefile25++++++++++++++++++++-----
2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,7 @@ *.a *.o -src/calc.cpp -\ No newline at end of file +*.so +*.so.* + +/src/calc.cpp +/src/bulletml.d diff --git a/src/Makefile b/src/Makefile @@ -3,6 +3,9 @@ LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o YY_OUT = calc.cpp +MAJOR=0d2 +MINOR=0 + VERSION = 0.0.6 PREFIX ?= /usr/local @@ -10,14 +13,26 @@ LIBDIR ?= $(PREFIX)/lib INCDIR ?= $(PREFIX)/include DOCDIR ?= $(PREFIX)/share/doc/libbulletml-$(VERSION)/ -all: libbulletml.a +all: libbulletml.a libbulletml.so + +libbulletml.so: tinyxml/tinyxml.o ../bulletml.d $(OBJS) $(LIBS) + $(CXX) $(LDFLAGS) -shared -Wl,-soname,$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) $(OBJS) $(LIBS) + rm -f $@.$(MAJOR) + ln -s $@.$(MAJOR).$(MINOR) $@.$(MAJOR) + rm -f $@ + ln -s $@.$(MAJOR) $@ + +libbulletml.a: tinyxml/tinyxml.o ../bulletml.d $(OBJS) + $(AR) cru $@ $(OBJS) $(LIBS) + +../bulletml.d: bulletml_d.cpp + perl ../d_cpp/create_d_import.pl bulletml_d.cpp bulletml.d -libbulletml.a: $(OBJS) +tinyxml/tinyxml.o: $(MAKE) -C tinyxml - $(AR) -r libbulletml.a *.o tinyxml/tiny*.o clean: - rm -f *.a $(OBJS) $(YY_OUT) + rm -f $(OBJS) $(YY_OUT) libbulletml.a libbulletml.so libbulletml.so.* $(MAKE) -C tinyxml clean calc.cpp: calc.yy @@ -28,7 +43,7 @@ $(OBJS): %.o: %.cpp install: all mkdir -p $(DESTDIR)$(LIBDIR)/ - cp libbulletml.a $(DESTDIR)$(LIBDIR)/ + cp libbulletml.* $(DESTDIR)$(LIBDIR)/ mkdir -p $(DESTDIR)$(INCDIR)/bulletml/ cp *.h $(DESTDIR)$(INCDIR)/bulletml/ mkdir -p $(DESTDIR)$(INCDIR)/bulletml/tinyxml/