Renaming output executive!
by Matthew Shapiro · in Torque Game Engine · 09/22/2002 (11:12 am) · 9 replies
I want to have a different executable based on what os I would compiling it for. First of all i want it to save with the name of my project. 2nd of all i want to have say the makefile put a _UNIX on the end of it if it's for linux. same wiht OSX
how would i go about doing this?
--KallDrexx
how would i go about doing this?
--KallDrexx
#2
EXE_NAME=torqueDemo_$(OS)
EXE_DEDICATED_NAME=torqueDemod_$(OS)
09/22/2002 (11:45 am)
If you're using makefiles, then you can edit the line at the top of engine/targets.torque.mk. The makefiles define a OS variable (WIN32, LINUX, etc), that you could use there, something like this:EXE_NAME=torqueDemo_$(OS)
EXE_DEDICATED_NAME=torqueDemod_$(OS)
#4
--KallDrexx
09/22/2002 (12:27 pm)
ah ok one final question. wehre in the makefile do I change the directory it puts the binary in?--KallDrexx
#5
09/22/2002 (12:33 pm)
The gcc drops the executable in out.GCC2.DEBUG or wherever, but targets.torque.mk also has a command to copy it to the example directory. Look for "../example" in the file.
#7
make -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG
and then do "make".
09/22/2002 (1:05 pm)
You mean compile with gcc3? The only difference with gcc3 in the makefiles is that the command "gcc3" is used instead of "gcc". If this is the case on your system, then just reconfigure the build withmake -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG
and then do "make".
#8
--KallDrexx
09/22/2002 (1:19 pm)
Hmm I have gcc 3.2, which is gcc-3.2, not gcc3 (executable file i mean) so therefore setting it to GCC3 makes it so i can't compile.. any ideas?--KallDrexx
#9
09/22/2002 (1:35 pm)
Just change the name of the gcc program in conf.GCC3.LINUX.mk
Associate James Urquhart
Look in engine/targets.torque.mk :
Change the lines marked with "-->" and add something like something like :
$(DIR.OBJ)/$(EXE_NAME)_linux$(EXT.EXE)