diff options
| author | manuel <manuel@mausz.at> | 2011-05-05 20:35:17 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-05-05 20:35:17 +0200 |
| commit | 5a96bdc36169a7c08335fae5190b67dd0a1fac72 (patch) | |
| tree | b930a702fffca3db311e0abe1e71317ee8432124 | |
| parent | ab9a11c56e623766df90f17c8e85489e7ae1ed38 (diff) | |
| download | foop-5a96bdc36169a7c08335fae5190b67dd0a1fac72.tar.gz foop-5a96bdc36169a7c08335fae5190b67dd0a1fac72.tar.bz2 foop-5a96bdc36169a7c08335fae5190b67dd0a1fac72.zip | |
compile instrucations
| -rw-r--r-- | pacman-c++/COMPILE | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pacman-c++/COMPILE b/pacman-c++/COMPILE new file mode 100644 index 0000000..8e588d3 --- /dev/null +++ b/pacman-c++/COMPILE | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | === compile - unix / linux === | ||
| 2 | |||
| 3 | compile enet: | ||
| 4 | $ wget http://enet.bespin.org/download/enet-1.3.1.tar.gz | ||
| 5 | $ tar xfz enet-1.3.1.tar.gz | ||
| 6 | $ mv enet-1.3.1 enet | ||
| 7 | $ cd enet | ||
| 8 | $ ./configure --disable-shared | ||
| 9 | $ make -j2 | ||
| 10 | |||
| 11 | compile pacman using qmake (or rebuild.sh) | ||
| 12 | $ ./rebuild.sh | ||
| 13 | |||
| 14 | |||
| 15 | === compile - windows === | ||
| 16 | |||
| 17 | compile enet: | ||
| 18 | - download and extract http://enet.bespin.org/download/enet-1.3.1.tar.gz to pacman directory | ||
| 19 | - rename enet-1.3.1 to enet | ||
| 20 | - open cmd and cd to that directory | ||
| 21 | - use (mingw-)gcc (the same qt sdk is using) and compile enet | ||
| 22 | you can either use mingw + configure or compile enet on your own using commandline method below | ||
| 23 | |||
| 24 | compile enet - commandline method: | ||
| 25 | - you will need to expand %PATH% before mingw tools are usable (set PATH=/path/to/mingw;%PATH%) | ||
| 26 | - execute do this for every *.c-file replacing $file with the filename: | ||
| 27 | $ gcc -DWIN32 -I. -Iinclude -g -O2 -c -o $file.o $file.c | ||
| 28 | e.g: gcc -DWIN32 -I. -Iinclude -g -O2 -c -o host.o host.c | ||
| 29 | - execute the following command to create a dll: | ||
| 30 | $ gcc -shared -o .libs/libenet.dll *.o -lws2_32 -lwinmm | ||
| 31 | |||
| 32 | - OPTIONAL: _instead_ of creating dll you can also create an archive and link against that | ||
| 33 | please note that you also _need to enable_ to link against ws2_32 and winmm in | ||
| 34 | the file common.pri (the part is currently commented) | ||
| 35 | $ ar cru .libs/libenet.a *.o | ||
| 36 | $ ranlib .libs/libenet.a | ||
| 37 | |||
| 38 | compile pacman using qmake or qt creator | ||
