Skip to content

Commit a23bf53

Browse files
JusonexJusonex
authored andcommitted
Merge pull request #1 from Necktrox/master
Update for solution, build scripts and sockets module
2 parents 810c961 + b20e3e7 commit a23bf53

File tree

8 files changed

+456
-592
lines changed

8 files changed

+456
-592
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#########################
22
# Remove old binary
33
#########################
4-
if [ -e "ml_sockets.so" ]; then
5-
rm ml_sockets.so
4+
if [ -e "./x32/ml_sockets.so" ]; then
5+
rm ./x32/ml_sockets.so
66
fi
77

88
#########################
99
# Prepare build
1010
#########################
1111
autoreconf -ifv
12-
./configure CXXFLAGS='-g -O2 -fPIC'
12+
./configure CXXFLAGS='-m32 -g -O2 -fPIC' CFLAGS='-m32' LDFLAGS='-m32'
1313
make clean
1414

1515
#########################
1616
# Do build
1717
#########################
1818
echo Building...
19-
make >_make.log
19+
make >_make-32.log
2020

2121
#########################
2222
# Check for error
@@ -30,6 +30,7 @@ fi
3030
#########################
3131
# Copy binary file
3232
#########################
33-
cp src/.libs/libml_sockets.so ./ml_sockets.so
34-
echo "Build completed "`pwd`"/ml_sockets.so"
33+
mkdir x32
34+
cp src/.libs/libml_sockets.so ./x32/ml_sockets.so
35+
echo "Build completed "`pwd`"/x32/ml_sockets.so"
3536
exit 0

sockets/build-64.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#########################
2+
# Remove old binary
3+
#########################
4+
if [ -e "./x64/ml_sockets.so" ]; then
5+
rm ./x64/ml_sockets.so
6+
fi
7+
8+
#########################
9+
# Prepare build
10+
#########################
11+
autoreconf -ifv
12+
./configure CXXFLAGS='-m64 -g -O2 -fPIC' CFLAGS='-m64' LDFLAGS='-m64'
13+
make clean
14+
15+
#########################
16+
# Do build
17+
#########################
18+
echo Building...
19+
make >_make-64.log
20+
21+
#########################
22+
# Check for error
23+
#########################
24+
rc=$?
25+
if [ $rc -ne 0 ]; then
26+
echo "Stopping: make returned error code $rc"
27+
exit 1
28+
fi
29+
30+
#########################
31+
# Copy binary file
32+
#########################
33+
mkdir x64
34+
cp src/.libs/libml_sockets.so ./x64/ml_sockets.so
35+
echo "Build completed "`pwd`"./x64/ml_sockets.so"
36+
exit 0

sockets/configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
AC_PREREQ(2.60)
55
AC_INIT(ml_sockets.so, 0.1)
66
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7+
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
8+
LT_INIT
79
AC_CONFIG_SRCDIR([include/lua.h])
810
AC_CONFIG_HEADER([config.h])
911
AC_CONFIG_FILES([Makefile luaimports/Makefile src/Makefile])

sockets/ml_sockets.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Microsoft Visual Studio Solution File, Format Version 10.00
2-
# Visual Studio 2008
3-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ml_sockets", "ml_sockets.vcproj", "{132A627F-058D-46F8-BCBB-63B6C8D2CC1A}"
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Express 2012 for Windows Desktop
3+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ml_sockets", "ml_sockets.vcxproj", "{132A627F-058D-46F8-BCBB-63B6C8D2CC1A}"
44
EndProject
55
Global
66
GlobalSection(SolutionConfigurationPlatforms) = preSolution

0 commit comments

Comments
 (0)