make in osx

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dogbrain
Posts: 6
Joined: Tue Sep 19, 2006 9:42 am

make in osx

Post by dogbrain »

Hi all!

Me and a couple of friends are planning a small game made in IRRLICHT. I am on osx and they are on windows. We therefore plan to use eclipse cdt and subversion to work togehther.

I have a problem that I cant download a new xcode (my current version is 2.0) beacuse apple wants to send a confirmation mail to my .mac account (wich is not active). I have contacted apple about this and hopefully I will get a reply soon that solves this issue.

Since I do not plan to use xcode anyway why cant I use the makefile to compile it. I have only a very limited knowledge of makefile but I cant see any reason why it should only work on Linux. Could someone please try to fix the makefile so that it compiles on osx too.

Or could someone please send me the precompiled 1.1 library (ppc or universal) so that I can start to learn.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Writing makefiles is not really difficult, the thing is that yo uhave to know your system and compiler. So just try it on your own. you have the Linux makefile template and you should know your system. I cannot help you other than this, because I don't know OSX at all.
dogbrain
Posts: 6
Joined: Tue Sep 19, 2006 9:42 am

Post by dogbrain »

It is probably really easy.. the problems that I run into using the linux compile file is of the sort that

Code: Select all

#ifdef MACOSX
  #define bswap_16(X) OSReadSwapInt16(&X,0)
  #define bswap_32(X) OSReadSwapInt32(&X,0)
...
Dont get executed..

So somehow the makefile should set the MACOSX. As I said I am a real newbie to c++ and makefiles.. Perhaps someone here knows how that is done easy. Who knows It might just be this easy. Any ideas anyone?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It seems to be set by XCode. I think I'll add a define in IrrCompileConfig to add the proper flag when official compiler flags for OSX are found. Meanwhile do 'make -DMACOSX'
dogbrain
Posts: 6
Joined: Tue Sep 19, 2006 9:42 am

Post by dogbrain »

'make -DMACOSX' doesnt work.. But I added it to the makefile and then it does the trick. Now i only have to figure out what frameworks etc that allso needs to be added.

Code: Select all

...
os.cpp: In static member function `static irr::u16 irr::os::Byteswap::byteswap(irr::u16)':
os.cpp:39: error: 'OSReadSwapInt16' was not declared in this scope
...
A computer program will always do what you tell it to do, but rarely what you want to do.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, you're right. Make does not support his variable passing, only via makefile variables (which might get overwritten, though), e.g. 'make CXX=g++'
Post Reply