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

Makefile (1659B)


  1. INCLUDES = -I.
  2. LIBS = tinyxml/tinyxml.o tinyxml/tinyxmlparser.o tinyxml/tinyxmlerror.o
  3. OBJS = bulletmlparser-tinyxml.o bulletmlparser.o bulletmltree.o calc.o formula-variables.o bulletmlrunner.o bulletmlrunnerimpl.o
  4. YY_OUT = calc.cpp
  5. MAJOR=0d2
  6. MINOR=0
  7. VERSION = 0.0.6
  8. PREFIX ?= /usr/local
  9. LIBDIR ?= $(PREFIX)/lib
  10. INCDIR ?= $(PREFIX)/include
  11. DOCDIR ?= $(PREFIX)/share/doc/libbulletml-$(VERSION)/
  12. all: libbulletml.a libbulletml.so
  13. libbulletml.so: tinyxml/tinyxml.o ../bulletml.d $(OBJS) $(LIBS)
  14. $(CXX) $(LDFLAGS) -shared -Wl,-soname,$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) $(OBJS) $(LIBS)
  15. rm -f $@.$(MAJOR)
  16. ln -s $@.$(MAJOR).$(MINOR) $@.$(MAJOR)
  17. rm -f $@
  18. ln -s $@.$(MAJOR) $@
  19. libbulletml.a: tinyxml/tinyxml.o ../bulletml.d $(OBJS)
  20. $(AR) cru $@ $(OBJS) $(LIBS)
  21. ../bulletml.d: bulletml_d.cpp
  22. perl ../d_cpp/create_d_import.pl bulletml_d.cpp bulletml.d
  23. tinyxml/tinyxml.o:
  24. $(MAKE) -C tinyxml
  25. clean:
  26. rm -f $(OBJS) $(YY_OUT) libbulletml.a libbulletml.so libbulletml.so.*
  27. $(MAKE) -C tinyxml clean
  28. calc.cpp: calc.yy
  29. $(YACC) -o $@ calc.yy
  30. $(OBJS): %.o: %.cpp
  31. $(CXX) -std=c++14 $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
  32. install: all
  33. mkdir -p $(DESTDIR)$(LIBDIR)/
  34. cp libbulletml.* $(DESTDIR)$(LIBDIR)/
  35. mkdir -p $(DESTDIR)$(INCDIR)/bulletml/
  36. cp *.h $(DESTDIR)$(INCDIR)/bulletml/
  37. mkdir -p $(DESTDIR)$(INCDIR)/d/
  38. cp bulletml.d $(DESTDIR)$(INCDIR)/d/
  39. mkdir -p $(DESTDIR)$(INCDIR)/bulletml/tinyxml/
  40. cp tinyxml/tinyxml.h $(DESTDIR)$(INCDIR)/bulletml/tinyxml/
  41. mkdir -p $(DESTDIR)$(INCDIR)/bulletml/ygg/
  42. cp ygg/ygg.h $(DESTDIR)$(INCDIR)/bulletml/ygg/
  43. mkdir -p $(DESTDIR)$(DOCDIR)/
  44. cp ../README* $(DESTDIR)$(DOCDIR)/
  45. doxy:
  46. doxygen
  47. distdir: