gcc compiling linking and flags

here's output of my Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pulis@pulis-desktop:~/nord$ make
g++    -c -o main.o main.cpp
g++    -c -o keyboard.o keyboard.cpp
g++    -c -o music.o music.cpp
g++    -c -o fontit.o fontit.cpp
g++    -c -o texture.o texture.cpp
g++    -c -o MS3DFile.o MS3DFile.cpp
g++    -c -o modelloader.o modelloader.cpp
g++    -c -o modloader.o modloader.cpp
g++    -c -o objectselectwindow.o objectselectwindow.cpp
g++    -c -o character.o character.cpp
g++    -c -o world.o world.cpp
g++    -c -o Quaternion.o Quaternion.cpp
g++ -O3 -g -o ismon -lboost_filesystem -lSDL_image -lSDL_ttf -lSDL_mixer -lGL -lGLU main.o keyboard.o music.o fontit.o texture.o MS3DFile.o modelloader.o modloader.o objectselectwindow.o character.o world.o Quaternion.o `sdl-config --cflags --libs` 


is it OK to leave -O3 to linker? or should it be in every line at 'g++ -c -o ' ?
The linker doesn't do any compiling, so it should be on lines 2..13.

I haven't looked to see if it affects linker options any, so my answer is "both".

*sheepish grin*
is it not OK to leave -O3 to linker.

it needs of be specified for each g++ statement
Topic archived. No new replies allowed.