forked from planetbeing/xpwn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD
92 lines (58 loc) · 2.24 KB
/
BUILD
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
INSTRUCTIONS FOR BUILDING XPWN
------------------------------
These are very basic instructions on how to build xpwn related projects, they
are tailored to Debian based systems. They are not meant to be a substitute
for experience in programming in GNU/Linux environments, but it should be a
good starting point.
1. Install a basic build environment (compilers, etc.):
sudo apt-get install build-essential
2. Install some prerequisites libraries required by xpwn:
sudo apt-get install libcrypt-dev libz-dev libbz2-dev3 libusb-dev
3. Install cmake. It is recommended you download and build it from the
official cmake website, since versions >= 2.6.0 are recommended.
wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz
tar zxvf cmake-2.6.2.tar.gz
cd cmake-2.6.2
./configure
make
sudo make install
Now you are ready to build xpwn. It is highly recommended that you build
out-of-source (that is, the build products are not placed into the same
folders as the sources). This is much neater and cleaning up is as simple as
deleting the build products folder.
Assuming xpwn sources are in ~/xpwn:
4. Create a build folder
cd ~
mkdir build
cd build
5. Create Makefiles
cmake ~/xpwn
6. Build
make
7. Package
make package
BUILDING USEFUL LIBRARIES
-------------------------
These command-lines can be substituted in for step 6. The products are in the
subfolders (make package will not include them).
xpwn library (for IPSW generation)
make libXPwn.a
Windows pwnmetheus library (for QuickPwn)
make libpwnmetheus.dll
HELPFUL MAKEFILE GENERATION COMMAND-LINES
-----------------------------------------
These command-lines can be substituted in for step 5.
Add debugging symbols:
cmake ~/xpwn -DCMAKE_C_FLAGS=-g
Try to only use static libraries:
cmake ~/xpwn -DBUILD_STATIC=YES
CROSS-COMPILING
---------------
This is a complex and advanced topic, but it is possible with the appropriate
CMake toolchain files and properly configured build environment. I have
crossbuilt Windows, OS X, Linux x86, Linux x64, and iPhone binaries from one
Ubuntu machine. The source trees are properly configured for this task.
MORE HELP
---------
Consult the CMake documentation and wiki and look in the CMakeLists.txt files
for hints on how things are supposed to work.