angelscript/angelscript-makefile.patch

48 lines
1.8 KiB
Diff

diff -Naur sdk.orig/angelscript/projects/gnuc/makefile sdk/angelscript/projects/gnuc/makefile
--- sdk.orig/angelscript/projects/gnuc/makefile 2011-09-16 23:31:42.000000000 +0200
+++ sdk/angelscript/projects/gnuc/makefile 2012-03-04 19:24:43.000000000 +0100
@@ -4,9 +4,14 @@
# For 'make install' to work, set LOCAL according to your system configuration
LOCAL = /usr/local
+# Predefined variables
+VERSION = 2.25.1
+SONAME = 2
+
# If you want to build a shared library, then run make with SHARED=1 and VERSION=version
ifdef SHARED
- LIB = libangelscript-$(VERSION).so
+ LIB = libangelscript.so.$(VERSION)
+ SONAMELIB = libangelscript.so.$(SONAME)
DEVLIB = libangelscript.so
else
LIB = libangelscript.a
@@ -100,8 +105,7 @@
$(BIN): $(OBJDIR) $(LIBDIR) $(OBJ)
ifdef SHARED
- $(CXX) -shared -Wl,-soname,$(LIB) -o $(BIN) $(OBJ)
- ( cd $(LIBDIR); ln -s $(LIB) $(DEVLIB) )
+ $(CXX) -shared -Wl,-soname,$(SONAMELIB) -o $(BIN) $(OBJ)
else
$(AR) r $(BIN) $(OBJ)
$(RANLIB) $(BIN)
@@ -132,10 +136,14 @@
@echo Installing to: $(LOCAL)/lib and $(LOCAL)/include...
@echo -------------------------------------------------------------------
ifdef SHARED
- $(COPIER) $(LIBDIR)/$(DEVLIB) $(LOCAL)/lib
+ ( cd $(LIBDIR); ln -s $(LIB) $(DEVLIB) ; ln -s $(LIB) $(SONAMELIB) )
+ mkdir -p $(DESTDIR)/$(DESTLIBDIR)
+ $(COPIER) $(LIBDIR)/$(DEVLIB) $(DESTDIR)/$(DESTLIBDIR)
+ $(COPIER) $(LIBDIR)/$(SONAMELIB) $(DESTDIR)/$(DESTLIBDIR)
endif
- $(COPIER) $(BIN) $(LOCAL)/lib
- $(COPIER) $(INCDIR)/$(INC) $(LOCAL)/include
+ $(COPIER) $(BIN) $(DESTDIR)/$(DESTLIBDIR)
+ mkdir -p $(DESTDIR)/usr/include
+ $(COPIER) $(INCDIR)/$(INC) $(DESTDIR)/usr/include
@echo -------------------------------------------------------------------
@echo Angelscript library installed. Enjoy!