gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Running Multiple Versions of GCC with make?

#18387 - notb4dinner - Thu Mar 25, 2004 12:00 pm

I've just started looking at doing GBA dev stuff again after a while off and have run into a bit of the problem. On my development machine I have DJGPP (DOS port of GCC targeted at x86) and devkit advance installed. By default I would like to use DJGPP so I have my PATH set to the appropriate directory. Now when I come to compile a GBA project I would like to be able to temporarily switch my path to something suitable for devkit advance.

At the moment I'm trying to do this by running 'set PATH=<devkit advance path>' from within my makefile, however this doesn't seem to be successfully setting the path (ie. a path command straight after returns the old path). Anyone got any suggestions?

(BTW: I'm developing with Eclipse so just setting the path from within a command window then compiling is not really an ideal solution).

#18391 - Paul Shirley - Thu Mar 25, 2004 2:13 pm

removed

Last edited by Paul Shirley on Sun Mar 28, 2004 8:54 pm; edited 1 time in total

#18444 - tepples - Fri Mar 26, 2004 2:35 am

I used to use Windows Millennium Edition for GBA development, compiling tools for my GBA projects with DJGPP. When I switched to Windows 2000, I switched from DJGPP to MinGW because the NT kernel isn't very friendly to DPMI apps, but the basic technique I used in TOD for GBA continued to work:
  1. Set your PATH to include your native compiler (e.g. MinGW or DJGPP), then DevKit Advance, then the rest of your PATH. (I do this with batch files when I start a 'cmd' session.)
  2. Put MinGW in front of your PATH.
  3. When you want to use native GCC, use gcc.
  4. When you want to use cross-GCC, use arm-agb-elf-gcc.
  5. As for files that a custom tool generates, make them depend on that tool's executable.

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#18498 - notb4dinner - Sun Mar 28, 2004 12:42 am

Thanks for the help guys, I got it working using tepples method. I spent a while mucking around with the -B option but it seemed to just plain not work (gcc was unable to find cc.exe no matter which path I specified for -B)... no idea why.