Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Changing compiler options in Linux when compiling LCS.  (Read 848 times)

Carlos Gustavos

  • Bay Watcher
    • View Profile
Changing compiler options in Linux when compiling LCS.
« on: February 03, 2011, 11:03:22 am »

I wanted to be able to do more with gdb and add a couple of defines, SHOWMECHANICS and one for a cheat menu I have, so I looked around in the files and ended up changing CXXFLAGS in the two Makefile and it worked.

Now I'm wondering, is this how it is supposed to be done or the best way to do it?
« Last Edit: February 03, 2011, 11:06:12 am by Carlos Gustavos »
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Changing compiler options in Linux when compiling LCS.
« Reply #1 on: February 03, 2011, 12:44:09 pm »

I just uncomment a line in includes.h (I think) that sets the define, but I suspect that any way that works for you is fine.
Logged

Ari Rahikkala

  • Bay Watcher
    • View Profile
Re: Changing compiler options in Linux when compiling LCS.
« Reply #2 on: February 05, 2011, 12:45:16 am »

Not sure if there's a cleaner way to do it, but one thing you can do is make clean and give the CXXFLAGS you like as an environment variable to configure. So, for instance, like so:

Code: [Select]
make clean
CXXFLAGS=-DSHOWMECHANICS=1 ./configure
make
Logged