4

I can't handle the Xcode IDE for this particular project anymore!

I have a simple C project I want to build into a static library for iOS, and I don't want to use the Xcode IDE.

I'm familiar with xcodebuild but my understanding is that I'd first need to create an Xcode project to use it - and simply being able to build the project on the command line isn't my goal.

I want a standard make-style build process for this project but can't seem to find any information about doing such a thing. It seems like I can't. Is that true?

Steve
  • 31,144
  • 19
  • 99
  • 122
  • XCode does just create the project for you and handles the compiling. So you could theoretically do the same without it. I mean, link against the SDK, build your library the same way Xcode does. – Jean Mar 30 '13 at 21:37
  • @Jean - yeah, but I don't want that. It's a pain. If I could theoretically do it without Xcode, I'd like to know how - since it seems like all the tools Apple distributes to do this work off a `.xcodeproj`. – Steve Mar 30 '13 at 21:38
  • That I can understand. Why avoid Xcode, if you don't mind my asking? I mean, it makes it easier. If your project is simple, you risk spending more time trying to avoid Xcode than actually developing the project. Can't the issues with Xcode be solved? – Jean Mar 30 '13 at 21:41
  • 1
    @Jean - the C project is used for a number of platforms and files get added/removed/etc. All I need for every other platform under the sun is a simple make file... except (until now) for iOS which required an XCode project that had to be manually maintained when the project sources changed. Just a pain. I love Xcode for most things, but in this particular scenario it really wasn't helping anything. – Steve Mar 30 '13 at 22:14
  • It is also useful for CI (continuous integration) – Bernardo Ramos Mar 01 '19 at 02:50

1 Answers1

5

You absolutely CAN use a makefile project. It's just a matter of using the correct paths, etc...

Here's something to get you started:

iOS static lib cross-compile script

Rikkles
  • 3,372
  • 1
  • 18
  • 24