Makefile-Projekte mit Xcode erstellen
Auf diese Weise lassen sich mit Xcode Projekte erstellen, die mit typischen Makefiles arbeiten.
Die Anleitung ist von der Seite der Apple Developer Connection entnommen und kann hier gefunden werden.
Vorgehensweise:
- Open Xcode.
- Choose New Project from the File menu.
- Select whatever project type you are targeting. If you ultimately want an application, select something like Cocoa Application. If you are just trying to build a command-line utility, select one of the tools—for example, Standard Tool.
- Follow the prompts to name and save your project. A new default project of that type is opened.
- From the Project menu, Choose New Target.
- Select “External Target” or “GNU Make Target” from the list.
- Follow the prompts to name that target. When you have done this, a target icon with the name you just gave it appears in the Targets pane of the open Xcode window.
- Double-click that new target. You should now see a new window with the build information for this target.
- Change the directory to point to the directory containing your makefile, and change any other settings as needed. For example, in the Custom Build Command pane, you could change Build Tool from
/usr/bin/gnumake
to/usr/bin/bsdmake
. More information on the fields is available in Xcode Help. - Change the active target to your new target by choosing “Set Active Target” from the Project menu.
- When you are ready to build the project, click the Build and Run button in the toolbar, select Build and Run from the Build menu, or just press Command-R.
Comments Off on Makefile-Projekte mit Xcode erstellen