tolua, delete obsolete copy (#7004)

This commit is contained in:
Schrijvers Luc
2022-06-26 08:12:06 +02:00
committed by GitHub
parent 73229ef498
commit aba62694fb

View File

@@ -1,106 +0,0 @@
From f4414319686b3119dca3678c4dba23e407bbe354 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 23 Jun 2022 14:30:28 +0200
Subject: tolua, import patches from openSUSE
diff --git a/Makefile b/Makefile
index 2d5f6af..a2fcb89 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,16 @@
# makefile for tolua hierarchy
+MAJOR = 5
+MINOR = 2
+REL = 4
+VERSION = $(MAJOR).$(MINOR).$(REL)
+
+PREFIX = /usr
+BINDIR = $(PREFIX)/bin
+LIB = lib
+LIBDIR = $(PREFIX)/$(LIB)
+INCLUDEDIR = $(PREFIX)/include
+
tolua:
cd src/lib; make all
cd src/bin; make all
@@ -7,6 +18,17 @@ tolua:
tests:
cd src/tests; make all
+install:
+ mkdir -p $(BINDIR)
+ mkdir -p $(INCLUDEDIR)
+ mkdir -p $(LIBDIR)
+ install -m 0644 bin/tolua $(BINDIR)
+ install -m 0644 include/tolua.h $(INCLUDEDIR)
+ install -m 0644 lib/libtolua.so.$(VERSION) $(LIBDIR)
+ ln -sf $(PREFIX)$(LIB)/libtolua.so.$(VERSION) $(LIBDIR)/libtolua.so.$(MAJOR).$(MINOR)
+ ln -sf $(PREFIX)$(LIB)/libtolua.so.$(VERSION) $(LIBDIR)/libtolua.so.$(MAJOR)
+ ln -sf $(PREFIX)$(LIB)/libtolua.so.$(VERSION) $(LIBDIR)/libtolua.so
+
all clean klean:
cd src/lib; make $@
cd src/bin; make $@
diff --git a/src/bin/Makefile b/src/bin/Makefile
index 4731778..9db4861 100755
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -17,16 +17,16 @@ T_D = $(TOLUA)/bin/tolua_lua
all: $(T)
$(T): $(OBJS)
- $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
toluabind.c: $(T_D)
$(T_D) -o toluabind.c tolua.pkg
$(T_D): $(OBJS_D)
- $(CC) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm
+ $(CC) $(CFLAGS) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm
tolua_lua.o: tolua.c
- $(CC) -c -DLUA_SOURCE $(INC) -o $@ $<
+ $(CC) $(CFLAGS) -c -DLUA_SOURCE $(INC) -o $@ $<
clean:
rm -f tolua_lua.o $(OBJS) -$(OBJS_D) $(T) $(T_D)
diff --git a/src/lib/Makefile b/src/lib/Makefile
index b2091f3..5d66a69 100755
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -11,17 +11,26 @@ OBJS= \
tolua_push.o \
tolua_to.o
+MAJOR = 5
+MINOR = 2
+REL = 4
+VERSION = $(MAJOR).$(MINOR).$(REL)
+
T= $(TOLUA)/lib/libtolua.a
+T_S = $(TOLUA)/lib/libtolua.so.$(VERSION)
-all: $T
+all: $T $(T_S)
$T: $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
+$(T_S): $(OBJS)
+ $(CC) -shared -Wl,-soname,libtolua.so.$(MAJOR) $^ -o $@
+
clean:
- rm -f $(OBJS)
-
+ rm -f $(OBJS)
+
klean:
rm -f $T
--
2.36.1