Porting to FreeBSD
I would like to port some software that was made to compile under both Win32 and Linux systems to FreeBSD 4.8. Can anyone provide me with online information to help me do this?
So far, I've had to use GNU make, because the provided makefile only runs under that (some info as to why this is would be nice). I've modified any ifdef statements and such to detect freebsd by using the '__FreeBSD__' constant instead of 'linux', so the code is unchanged in that it still processes the Linux code. These changes still don't let me compile successfully - the last time I compiled I received mostly syntax errors before keywords like 'int' and 'void' where a capitalized constant was being used (NEW_DLL_FUNCTIONS), but I don't know where that capitalized thing (typedef for something, I guess) is being defined - none of the sources file have it. I don't even want DLL stuff in my code - it's not windows here.
Anyway, I'm having many issues here. I'm a complete newb to porting. I can't find any overall tutorials on what to look for when porting, and how to resolve common errors. Nor have I been able to find any reference regarding which headers to use when the header being looked for doesn't exist on my system.
Thanks for any input!
I am using gmake (GNU Make). :) Yes, the NEW_DLL_FUNCTIONS declaration is specific to the code I'm porting. Actually it's the only thing keeping the code from compiling as far as I can tell. It is *not* defined anywhere in the source I have, however, so I don't know what to do with it. Logic would assume that I must not have all the source, but I'm positive I do have it all.
gcc -E... I'll try that. Is there any way to have GCC list any #define'd constants? For instance, it took me a while to figure out that __FreeBSD__ was defined under FreeBSD systems. I'd like to know if there are any other goodies like this that GCC can tell me through a special flag or something?