|
 |
>>> The solution, as I just discovered, is to name the files *.cpp rather
>>> than *.c++; this apparently enables Make's implicit rules to fire.
>
>> Not a good solution because you are not getting warnings nor
>> optimizations.
>
> Btw, if you haven't followed the ensuing flamewar in this thread, let me
> repeat a nice trick with gnu make here. If you want to be able to just
> write "make programname" and have 'make' compile the program, but you want
> it to use some compiler options such as warnings and optimizations, create
> a makefile in the directory where the source codes are and put this line
> in it (nothing else is needed):
>
> CXXFLAGS=-Wall -O3
>
> Now when you write "make programname", it will give those options to the
> compiler.
OK. Thanks for the tip.
I'm curious to see if turning on optimisations actually makes any
noticeable performance difference... I guess I'll find out tomorrow.
Post a reply to this message
|
 |