commit: 4cf6becac0768dff13d5c8ceccc272f9da0f1b4e
parent c99c40240961dbb5360f296e0c339c2997b47746
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Mar 2024 21:05:05 +0100
src/Makefile: Add install target
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/Makefile b/src/Makefile
@@ -3,6 +3,13 @@ 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
+VERSION = 0.0.6
+
+PREFIX ?= /usr/local
+LIBDIR ?= $(PREFIX)/lib
+INCDIR ?= $(PREFIX)/include
+DOCDIR ?= $(PREFIX)/share/doc/libbulletml-$(VERSION)/
+
all: libbulletml.a
libbulletml.a: $(OBJS)
@@ -19,6 +26,18 @@ calc.cpp: calc.yy
$(OBJS): %.o: %.cpp
$(CXX) -std=c++14 $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
+install: all
+ mkdir -p $(DESTDIR)$(LIBDIR)/
+ cp libbulletml.a $(DESTDIR)$(LIBDIR)/
+ mkdir -p $(DESTDIR)$(INCDIR)/bulletml/
+ cp *.h $(DESTDIR)$(INCDIR)/bulletml/
+ mkdir -p $(DESTDIR)$(INCDIR)/bulletml/tinyxml/
+ cp tinyxml/tinyxml.h $(DESTDIR)$(INCDIR)/bulletml/tinyxml/
+ mkdir -p $(DESTDIR)$(INCDIR)/bulletml/ygg/
+ cp ygg/ygg.h $(DESTDIR)$(INCDIR)/bulletml/ygg/
+ mkdir -p $(DESTDIR)$(DOCDIR)/
+ cp ../README* $(DESTDIR)$(DOCDIR)/
+
doxy:
doxygen