linux - Swap unix compiler flags with a shorter one -


i've been running ns3 sumulations in linux , every time compiled had type

g++ -wall -o simulacija simulacija.cc -dns3_assert_enable -dns3_log_enable `pkg-config --libs --cflags libns3.16-core-debug libns3.16-network-debug libns3.16-applications-debug libns3.16-internet-debug libns3.16-point-to-point-debug libns3.16-point-to-point-layout-debug libns3.16-csma-debug libns3.16-csma-layout-debug libns3.16-topology-read-debug libns3.16-wifi-debug` 

is there way shorten flags eg:

g++ -wall simulacija.cc -o simulacija -my_params 

thank you

the gcc compiler supports @ notation embed sequence of arguments inside file. read near end of gcc overall options page.

so put in file params.args following lines

-wall -i /usr/local -dns3_assert_enable  -dns3_log_enable -o 

and invoke

g++ @params.args  simulacija.cc -o simulacija 

you have makefile rule build params.args (e.g. pkg-config etc...)

actually, time learn how use gnu make.

notice @ option not understood other compilers gcc handles it.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -