forked from svn2github/TheDarkMod_SVN_Unofficial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
COMPILING.txt
69 lines (45 loc) · 2.99 KB
/
COMPILING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
To read the most recent compilation guide, please visit:
http://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide
See also the README.linux file for further info about how to compile the code for Linux.
=== Additional info about building the static 32-bit library libcurl ===
Download the libcurl 7.21 source package, and extract it on your system, then run the following commands:
env CFLAGS="-m32" LDFLAGS="-m32" ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib
make
sudo make install
The library is then located in /usr/local/lib/libcurl.a.
Copy that to darkmod_src/linux/libcurl/
=== Building libcurl in Mac OS X ===
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called "fat" binary you need to
compile for both i386 and ppc targets.
Build the i386 target by entering:
env CFLAGS="-m32 -arch i386" LDFLAGS="-m32 -arch i386" ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl
make
sudo make install
After make install the static library can be found in /usr/local/lib/libcurl.a, copy that file to your curl folder
and rename it to ./libcurl.i386.a
Build the powerpc target by entering:
env CFLAGS="-m32 -arch ppc" LDFLAGS="-m32 -arch ppc" ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl
make
sudo make install
After make install the static library can be found in /usr/local/lib/libcurl.a, copy that file to your curl folder
and rename it to ./libcurl.ppc.a
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.
lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a
The filesize of the newly created libcurl.a should be around the sum of the single ppc and i386 libs, you can double-check that.
Copy the libcurl.a into your darkmod_src/macosx/libcurl/ and you're done with this step.
=== Building Boost static libs in Mac OS X ===
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the
g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and
name it user-config-darwin.jam:
using darwin : 8.11 : /usr/bin/g++-4.0 :
<architecture>"combined"
<address-model>"32"
<macosx-version>"10.4"
<macosx-version-min>"10.4"
<link>"static"
<threading>"multi" ;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:
/path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]
The "stage" option only works in filesystem and system (not in thread, as of boost 1.45). You'll find the filesystem and system libs in
the ./stage folder of your boost root, the libboost_thread.a will be located in the bin.v2 folder after compilation.
Copy all libboost*.a files to darkmod_src/macosx/boost/lib/.