Skip to content

Commit

Permalink
finish linux scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zilongshanren committed Aug 19, 2014
1 parent b15a85d commit 3e94cb0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Box2D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ file(GLOB_RECURSE box2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/Box2D/*.cpp")

if(LINUX32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
elseif(LINUX64)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
endif(LINUX32)

Expand Down
21 changes: 14 additions & 7 deletions Box2D/build_linux.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
#!/bin/sh
# in order to build 32 bit application on 64bit machine
# we have to install the following packages
# and also we should specify the CXX_FLAGS = m32
sudo apt-get install libx32gcc-4.8-dev

sudo apt-get install libc6-dev-i386

sudo apt-get install lib32stdc++6

sudo apt-get install g++-multilib

rm -rf prebuilt

cmake -DLINUX32=1 .

make

# mkdir -p prebuilt/32/
# cp lib/libBox2D.a prebuilt/32/
# rm -rf lib
mkdir -p prebuilt/32/
cp lib/libBox2D.a prebuilt/32/
rm -rf lib

# cmake -DLINUX64=1 .
cmake -DLINUX32=0 .

# make
make


# mkdir -p prebuilt/64/
# cp lib/libBox2D.a prebuilt/64/
mkdir -p prebuilt/64/
cp lib/libBox2D.a prebuilt/64/

0 comments on commit 3e94cb0

Please sign in to comment.