You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.2 KiB
53 lines
2.2 KiB
Index: build.sh |
|
--- build.sh.orig 2011-03-19 14:12:53.000000000 +0100 |
|
+++ build.sh 2011-03-20 16:14:37.000000000 +0100 |
|
@@ -2,42 +2,12 @@ |
|
ARCH=`uname -m` |
|
OS=`uname -o` |
|
|
|
-if [ "$OS" = "GNU/Linux" ]; then |
|
- LUAPKG="lua" |
|
- |
|
- pkg-config --exists lua # Arch Linux |
|
- if [ $? == 1 ]; then |
|
- pkg-config --exists lua5.1 # Ubuntu, and others |
|
- if [ $? == 0 ]; then |
|
- LUAPKG="lua5.1" |
|
- fi |
|
- fi |
|
- |
|
- if [ "$ARCH" = "x86_64" ]; then |
|
- g++ -m64 -rdynamic $SRC src/arch/x86_64.cpp src/os/linux.cpp -o tmake -Iinclude -DARCH=x86_64 -DLINUX -static `pkg-config --libs --cflags $LUAPKG` -std=c++0x -Wall -ldl |
|
- else |
|
- g++ -m32 -rdynamic $SRC src/arch/x86_32.cpp src/os/linux.cpp -o tmake -Iinclude -DARCH=x86_32 -DLINUX -static `pkg-config --libs --cflags $LUAPKG` -std=c++0x -Wall -ldl |
|
- fi |
|
-elif [ "$OS" = "Haiku" ]; then |
|
- setgcc gcc4 |
|
- |
|
- if [ "$ARCH" = "x86_64" ]; then |
|
- g++ -m64 $SRC src/arch/x86_64.cpp src/os/haiku.cpp -o tmake -Iinclude -DARCH=x86_64 -DHAIKU /boot/common/lib/gcc4/liblua.a -std=c++0x -Wall |
|
- else |
|
- g++ -m32 $SRC src/arch/x86_32.cpp src/os/haiku.cpp -o tmake -Iinclude -DARCH=x86_32 -DHAIKU /boot/common/lib/gcc4/liblua.a -std=c++0x -Wall |
|
- fi |
|
-elif [ "$OS" = "FreeBSD" ]; then |
|
- if [ "$ARCH" = "x86_64" ]; then |
|
- g++ -m64 $SRC src/arch/x86_64.cpp src/os/freebsd.cpp -o tmake -Iinclude -DARCH=x86_64 -DFREEBSD -llua -std=c++0x -Wall |
|
- else |
|
- g++ -m32 $SRC src/arch/x86_32.cpp src/os/freebsd.cpp -o tmake -Iinclude -DARCH=x86_32 -DFREEBSD -llua -std=c++0x -Wall |
|
- fi |
|
-elif [ "$OS" = "NetBSD" ]; then |
|
- if [ "$ARCH" = "x86_64" ]; then |
|
- g++ -m64 $SRC src/arch/x86_64.cpp src/os/netbsd.cpp -o tmake -Iinclude -DARCH=x86_64 -DNETBSD -llua -std=c++0x -Wall |
|
- else |
|
- g++ -m32 $SRC src/arch/x86_32.cpp src/os/netbsd.cpp -o tmake -Iinclude -DARCH=x86_32 -DNETBSD -llua -std=c++0x -Wall |
|
- fi |
|
+if [ "$ARCH" = "x86_64" ]; then |
|
+ XXX="-DARCH=x86_64 -DLINUX src/arch/x86_64.cpp src/os/linux.cpp" |
|
else |
|
- echo Your operating system is not supported at the moment. |
|
+ XXX="-DARCH=x86_32 -DLINUX src/arch/x86_32.cpp src/os/linux.cpp" |
|
fi |
|
+ |
|
+LUAPKG="lua" |
|
+$CXX $SRC $XXX -std=c++0x -o tmake -Iinclude/ `pkg-config --libs --cflags $LUAPKG` |
|
+
|
|
|