Game Development Community

Xcode vs makefile

by zenasprime · in Torque Game Engine · 11/12/2004 (9:15 am) · 7 replies

The project I am working on is cross platform. The programers are doing the majority of the work and compiling the code on the Window platform. As is expected, they use the makefile to process their source code.

Since Xcode does not use the makefile, I have to figure out what code has changed and add/remove targets in Xcode. It's a duplication of effort and a real pain in the butt. Not to mention how it can interfere with the debugging process if change is accidently missed.

What I would like to know is, how can a makefile be used instead of this target system that Xcode uses to compile? The information I have been able to gather on this subject has be rather vague. If someone that does this regularly could give me some pointers, I would be a happy camper.

#1
11/20/2004 (9:38 pm)
I certainly can't give you any hands-on pointers. You could always try and use a copy of what the proggers using, combined with unix-specified makefile configs (in the "torque/mk/" directory) to eventually create a single makefile that properly handles all targeted platforms.

This may also be of some use:
http://www.macdevcenter.com/pub/a/mac/2004/04/20/xcodetounix.html
#2
11/21/2004 (9:21 am)
Why do you have to add and remove targets because of code changes? That doesn't make any sense. All you should ever have to do is take the new code files, replace the old files with them and rebuild. If there are new files to add, just them into the project.

If you want to use a makefile you'll use gcc from Terminal. There's no advantage to them in my mind so I never use them though.
#3
11/21/2004 (9:24 am)
@Seth: he means adding new files to the targets. Our Windows and Linux devs both use POSIX compliant make environments, so we update targets.torque.mk.

The Mac dev environment however uses Xcode, which we are trying to figure out if we can get to use POSIX complaint environment as well--if not, is there a workaround for Mac similar to the MinSys/MingW environment.
#4
11/21/2004 (9:30 am)
The process for Linux should be extremely similar to that on OS X. Has anyone tried it? What kind of errors do you come across?
#5
11/21/2004 (9:51 am)
It is, and you are correct, once you're up to date, it should be a simple (if manual) process to stay up to date.

We were trying to see if anyone had been able to implement even a minimalistic POSIX compliant make env in Mac, so we wouldn't have to backtrack and manually add/modify all the changes we've made so our Mac dev can get up to speed.

For example--we're using TCPObject for our Account Server (backchannel TCP connection in addition to the UDP GameConnection during login/validation). The Mac client crashes here, and/or hangs, and since the project file update process was done manually, we weren't quite sure if it is an environment out of synch issue, or a problem with Mac TCPObject.

The best way to be sure we were hoping is simply to blow off Xcode entirely, and/or get it to read in targets.torque.mk directly.
#6
11/21/2004 (11:46 am)
Steve hits the nail on the head. It's not that we can't add/remove targets manually, it's that we would like to "automate" that process since it's already being done using targets.torque.mk. It's a duplication of effort that is time consuming and a distraction from doing the "real" work. :)
#7
11/21/2004 (11:47 am)
Ahh. I really don't know. Sorry.