Skip to content

Commit 87ffd6e

Browse files
committed
update README for Xcode project
1 parent 8c95a81 commit 87ffd6e

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

xcode/Capstone.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
21CBA9C52F6B8643009FC2DD /* tricore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tricore.h; sourceTree = "<group>"; };
225225
21CBA9C62F6B8643009FC2DD /* wasm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wasm.h; sourceTree = "<group>"; };
226226
21CBA9C72F6B8643009FC2DD /* xtensa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xtensa.h; sourceTree = "<group>"; };
227+
21CBA9D72F6B8EC8009FC2DD /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
227228
DC474F6819DE6F3B00BCA449 /* Capstone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Capstone.framework; sourceTree = BUILT_PRODUCTS_DIR; };
228229
DC474F6B19DE6F3B00BCA449 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
229230
DCA3577B1BC2C0290094BB3F /* M68KDisassembler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = M68KDisassembler.c; sourceTree = "<group>"; };
@@ -345,6 +346,7 @@
345346
DCFE239919DDCB4900EF8EA9 = {
346347
isa = PBXGroup;
347348
children = (
349+
21CBA9D72F6B8EC8009FC2DD /* README.md */,
348350
DCFE249D19DDCDEE00EF8EA9 /* cs.c */,
349351
21CBA9B12F6B7FF6009FC2DD /* Mapping.c */,
350352
DCFE249E19DDCDEE00EF8EA9 /* MCInst.c */,

xcode/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,35 @@ Xcode Project for Capstone
22
================================================================================
33

44
The *Capstone.xcodeproj* project is an Xcode project that mimics the Visual
5-
Studio solution for Capstone. It embeds nicely into Xcode workspaces. It has 13
6-
targets, two of which are the most likely to be of interest:
5+
Studio solution for Capstone. It embeds nicely into Xcode workspaces. It has 3
6+
targets:
77

88
* CapstoneStatic, producing `libcapstone.a`, Capstone as a static library;
99
* CapstoneDynamic, producing `libcapstone.dylib`, Capstone as a shared library;
10-
* test, test_arm, test_aarch64, test_detail, test_mips, test_ppc, test_skipdata,
11-
test_sparc, test_systemz, test_xcore, testing all the things.
10+
* CapstoneFramework, producing `Capstone.framework`, Capstone as a macOS
11+
framework bundle containing the library and public headers.
1212

1313
The project is configured to include all targets and use the system
1414
implementations of `malloc`, `calloc`, `realloc`, `free` and `vsnprintf`. This
15-
can be modified by editing the *Preprocessor Macros* build setting of either
16-
CapstoneStatic or CapstoneDynamic, whichever you plan to use. These settings are
17-
all at the target level: no specific overrides were used at the project level.
15+
can be modified by editing the *Preprocessor Macros* build setting of the
16+
target you plan to use. These settings are all at the target level: no specific
17+
overrides were used at the project level.
1818

19-
### A Word of Warning: Static vs. Shared Library
19+
### Building
20+
21+
The project can be built in Xcode or using `xcodebuild`:
22+
23+
```sh
24+
xcodebuild -target CapstoneStatic -configuration Release
25+
xcodebuild -target CapstoneDynamic -configuration Release
26+
xcodebuild -target CapstoneFramework -configuration Release
27+
```
28+
29+
### Including the Xcode project in a workspace
2030

2131
There is a bug in how Xcode handles static libraries and dynamic libraries of
2232
the same name. Currently, if you integrate the Capstone project in a workspace
2333
and both the static *and* the dynamic libraries are built, if you try to link
2434
against either, you will *always* link against the dynamic one. To work around
2535
this issue, you can avoid building the dynamic library if you don't plan to use
26-
it, or you could change the *Product Name* build setting of either.
36+
it, or you could change the *Product Name* build setting of either.

0 commit comments

Comments
 (0)