How to compile quickly without continously having to type the whole story of -wall -werror and all those other flags. I know how to use them, but it is a little bit of annoying if I have to type it again and again. Maybe this is asked before, but I couldn't find it.
Asked
Active
Viewed 153 times
0
-
Create an alias, write a function, use a makefile <- pick one. – muru Mar 05 '15 at 15:31
-
What is an alias? How to do this? – Genie Kort Mar 05 '15 at 15:31
-
Aliases are shortcuts. See http://community.linuxmint.com/tutorial/view/891 – muru Mar 05 '15 at 15:33
1 Answers
1
Create a Makefile. As your project might grow larger, your bash alias will most likely not always cover what you need and you might have to call it multiple times to get everything compiled.
When your Makefile is up-to-date, all you have to type is make
to build your whole project.
See http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/.

Hurzelchen
- 281
-
Is it possible to make a universal makefile, so that I could just use it automaticly for every file. Like make in CS50-appliance? – Genie Kort Mar 05 '15 at 20:35
-
Have a look into stackoverflow questions on wildcards in Makefiles. – Hurzelchen Mar 06 '15 at 08:44