What are the advantages of using `make` for small projects?IDE for large, multi-language projects (ie linux...

What to do when being responsible for data protection in your lab, yet advice is ignored?

Can pricing be copyrighted?

Tikzing a circled star

Compound Interest... with Wizard Money

Can polymorphing monsters spam their ability to effectively give themselves a massive health pool?

Issues with new Macs: hardware makes them difficult to use … what options might be available in the future?

Reference on complex cobordism

QGIS: use geometry from different layer in symbology expression

Are there any outlying considerations if I treat donning a shield as an object interaction during the first round of combat?

Using only 1s, make 29 with the minimum number of digits

Does Windows 10's telemetry include sending *.doc files if Word crashed?

Can a person refuse a presidential pardon?

Is there hidden data in this .blend file? Trying to minimize the file size

Why did Jodrell Bank assist the Soviet Union to collect data from their spacecraft in the mid 1960's?

Why would the Pakistan airspace closure cancel flights not headed to Pakistan itself?

What do you call a fact that doesn't match the settings?

Why don't I see the difference between two different files in insert mode in vim?

Trouble with Impersonal Passive Voice usage

How should I handle players who ignore the session zero agreement?

Is it safe to try charging my laptop with a USB-C PD charger that has less wattage than recommended?

What's the most convenient time of year in the USA to end the world?

Can you earn endless XP using a Flameskull and its self-revival feature?

Avoiding morning and evening handshakes

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?



What are the advantages of using `make` for small projects?


IDE for large, multi-language projects (ie linux kernel)Make Completion Progress Scriptuse bash to pass 2 variables to a MakefileInvoke python script through make commandWhat is the best approach with checking dependencies for third party library during compilation from the sources?How does this Makefile makes C program without even specifying a compiler?make unable to recurse for autoconf-like projectsWhy don't here strings in Makefiles using Bash work?module makefile fails for armv7l when modules are compressedWhat microarchitecture are packages on apt/yum typically built/tuned for?













5















I've seen that make is useful for large projects, especially with confusing dependencies described in a Makefile, and also helping with workflow. 
I haven't heard any advantages for using make for small projects. 
Are there any?










share|improve this question









New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    optimism for growth? :) good habits? This might stray into opinion territory.

    – Jeff Schaller
    7 hours ago











  • type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

    – user2497
    6 hours ago











  • they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

    – Eevee
    5 hours ago











  • I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

    – Jennifer
    3 hours ago











  • @Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

    – Voo
    2 hours ago


















5















I've seen that make is useful for large projects, especially with confusing dependencies described in a Makefile, and also helping with workflow. 
I haven't heard any advantages for using make for small projects. 
Are there any?










share|improve this question









New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    optimism for growth? :) good habits? This might stray into opinion territory.

    – Jeff Schaller
    7 hours ago











  • type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

    – user2497
    6 hours ago











  • they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

    – Eevee
    5 hours ago











  • I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

    – Jennifer
    3 hours ago











  • @Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

    – Voo
    2 hours ago
















5












5








5


1






I've seen that make is useful for large projects, especially with confusing dependencies described in a Makefile, and also helping with workflow. 
I haven't heard any advantages for using make for small projects. 
Are there any?










share|improve this question









New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I've seen that make is useful for large projects, especially with confusing dependencies described in a Makefile, and also helping with workflow. 
I haven't heard any advantages for using make for small projects. 
Are there any?







scripting compiling make development






share|improve this question









New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 45 mins ago









G-Man

13.3k93566




13.3k93566






New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 7 hours ago









Goodwin LuGoodwin Lu

284




284




New contributor




Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Goodwin Lu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 2





    optimism for growth? :) good habits? This might stray into opinion territory.

    – Jeff Schaller
    7 hours ago











  • type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

    – user2497
    6 hours ago











  • they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

    – Eevee
    5 hours ago











  • I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

    – Jennifer
    3 hours ago











  • @Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

    – Voo
    2 hours ago
















  • 2





    optimism for growth? :) good habits? This might stray into opinion territory.

    – Jeff Schaller
    7 hours ago











  • type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

    – user2497
    6 hours ago











  • they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

    – Eevee
    5 hours ago











  • I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

    – Jennifer
    3 hours ago











  • @Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

    – Voo
    2 hours ago










2




2





optimism for growth? :) good habits? This might stray into opinion territory.

– Jeff Schaller
7 hours ago





optimism for growth? :) good habits? This might stray into opinion territory.

– Jeff Schaller
7 hours ago













type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

– user2497
6 hours ago





type make to discover the answer. make a decent template Makefile and just edit its source files variable. no need to type all that jazz.

– user2497
6 hours ago













they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

– Eevee
5 hours ago





they're kind of a nightmare for large projects, so honestly, i'd say they're only good for small projects ;)

– Eevee
5 hours ago













I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

– Jennifer
3 hours ago





I could use makefiles, but I don't. I've divided my source code for my biggest (personal) project into 10 files, recompile the first, and the first has #includes for the other nine. With the speed of recompilation, it doesn't matter to me if it all gets recompiled every time.

– Jennifer
3 hours ago













@Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

– Voo
2 hours ago







@Jennifer So what happens if your project starts to require special compiler or linker commands? You just remember them and hope that in a year or so when you get back you'll still get them right? What if you want to share it with someone else? (that said makefiles are an awful way to go about this for anything non-trivial, I agree with Eevee on that one)

– Voo
2 hours ago












4 Answers
4






active

oldest

votes


















5














As opposed to what?



Suppose you have a program that you have split into two files,
which you have imaginatively named file1.c and file2.c
You can compile the program by running



cc file1.c file2.c -o yourprogram


But this requires recompiling both files every time,
even if only one has changed. 
You can decompose the compilation steps into



cc -c file1.c
cc -c file2.c
cc file1.o file2.o -o yourprogram


and then, when you edit one of the files, recompile only that file
(and perform the linking step no matter what you changed). 
But what if you edit one file, and then the other,
and you forget that you edited both files,
and accidentally recompile only one?



Also, even for just two files,
you’ve got about 60 characters’ worth of commands there. 
That quickly gets tedious to type. 
OK, sure, you could put them into a script,
but then you’re back to recompiling every time. 
Or you could write a really fancy, complicated script that checks
what file(s) had been modified and does only the necessary compilations. 
Do you see where I’m going with this?






share|improve this answer
























  • For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

    – Peter Cordes
    3 hours ago











  • Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

    – Roger Lipscombe
    2 hours ago



















4














Even with small project it can be helpful keeping the dependency logic under control and builds automated. I also used it to trigger installs and deinstallations, so it was a main switch resetting the stage.






share|improve this answer































    1














    A lot of other people are getting into the details of more complex makefiles and a lot of the complexity that comes with them. I typically use makefiles for a completely different reason:



    I don't want to remember anything.



    Even if your project is really boring and simple, and you don't use makefiles "correctly":



    all:
    gcc main.c -o project


    I don't need to think about it or treat it any differently than a project that's more complex:



    all:
    gcc libA.c libB.c main.c -o project2


    Or if I specified flags (e.g. -O2) I don't need to remember what they were.



    Also, if you start with a simple makefile, and you need to merge/refactor things later, you don't need to remember to build every project differently.






    share|improve this answer































      0














      If you link your app from 2 sources (.c files) , you do not need to recompile each file, but only the changed one if you are using make.



      Also, I will give you example from BSD world. They have framework of system-based Makefiles. They provide you paths to system directories and have targets to install your software and manual pages.



      For example, you just wrote beer.c app and manual for it called beer.6.
      You create Makefile:



      PROG=   beer
      MAN= beer.6

      .include <bsd.prog.mk>


      ..and call make install. It automatically compiles and installs your app to /usr/bin and compiles and installs your man page to the place where man can find it. You just installed your app with one simple command!



      Very convenient and absolutely transparent for anyone who is familiar with BSD.
      Much better than manual script.






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });






        Goodwin Lu is a new contributor. Be nice, and check out our Code of Conduct.










        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503975%2fwhat-are-the-advantages-of-using-make-for-small-projects%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        As opposed to what?



        Suppose you have a program that you have split into two files,
        which you have imaginatively named file1.c and file2.c
        You can compile the program by running



        cc file1.c file2.c -o yourprogram


        But this requires recompiling both files every time,
        even if only one has changed. 
        You can decompose the compilation steps into



        cc -c file1.c
        cc -c file2.c
        cc file1.o file2.o -o yourprogram


        and then, when you edit one of the files, recompile only that file
        (and perform the linking step no matter what you changed). 
        But what if you edit one file, and then the other,
        and you forget that you edited both files,
        and accidentally recompile only one?



        Also, even for just two files,
        you’ve got about 60 characters’ worth of commands there. 
        That quickly gets tedious to type. 
        OK, sure, you could put them into a script,
        but then you’re back to recompiling every time. 
        Or you could write a really fancy, complicated script that checks
        what file(s) had been modified and does only the necessary compilations. 
        Do you see where I’m going with this?






        share|improve this answer
























        • For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

          – Peter Cordes
          3 hours ago











        • Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

          – Roger Lipscombe
          2 hours ago
















        5














        As opposed to what?



        Suppose you have a program that you have split into two files,
        which you have imaginatively named file1.c and file2.c
        You can compile the program by running



        cc file1.c file2.c -o yourprogram


        But this requires recompiling both files every time,
        even if only one has changed. 
        You can decompose the compilation steps into



        cc -c file1.c
        cc -c file2.c
        cc file1.o file2.o -o yourprogram


        and then, when you edit one of the files, recompile only that file
        (and perform the linking step no matter what you changed). 
        But what if you edit one file, and then the other,
        and you forget that you edited both files,
        and accidentally recompile only one?



        Also, even for just two files,
        you’ve got about 60 characters’ worth of commands there. 
        That quickly gets tedious to type. 
        OK, sure, you could put them into a script,
        but then you’re back to recompiling every time. 
        Or you could write a really fancy, complicated script that checks
        what file(s) had been modified and does only the necessary compilations. 
        Do you see where I’m going with this?






        share|improve this answer
























        • For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

          – Peter Cordes
          3 hours ago











        • Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

          – Roger Lipscombe
          2 hours ago














        5












        5








        5







        As opposed to what?



        Suppose you have a program that you have split into two files,
        which you have imaginatively named file1.c and file2.c
        You can compile the program by running



        cc file1.c file2.c -o yourprogram


        But this requires recompiling both files every time,
        even if only one has changed. 
        You can decompose the compilation steps into



        cc -c file1.c
        cc -c file2.c
        cc file1.o file2.o -o yourprogram


        and then, when you edit one of the files, recompile only that file
        (and perform the linking step no matter what you changed). 
        But what if you edit one file, and then the other,
        and you forget that you edited both files,
        and accidentally recompile only one?



        Also, even for just two files,
        you’ve got about 60 characters’ worth of commands there. 
        That quickly gets tedious to type. 
        OK, sure, you could put them into a script,
        but then you’re back to recompiling every time. 
        Or you could write a really fancy, complicated script that checks
        what file(s) had been modified and does only the necessary compilations. 
        Do you see where I’m going with this?






        share|improve this answer













        As opposed to what?



        Suppose you have a program that you have split into two files,
        which you have imaginatively named file1.c and file2.c
        You can compile the program by running



        cc file1.c file2.c -o yourprogram


        But this requires recompiling both files every time,
        even if only one has changed. 
        You can decompose the compilation steps into



        cc -c file1.c
        cc -c file2.c
        cc file1.o file2.o -o yourprogram


        and then, when you edit one of the files, recompile only that file
        (and perform the linking step no matter what you changed). 
        But what if you edit one file, and then the other,
        and you forget that you edited both files,
        and accidentally recompile only one?



        Also, even for just two files,
        you’ve got about 60 characters’ worth of commands there. 
        That quickly gets tedious to type. 
        OK, sure, you could put them into a script,
        but then you’re back to recompiling every time. 
        Or you could write a really fancy, complicated script that checks
        what file(s) had been modified and does only the necessary compilations. 
        Do you see where I’m going with this?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        G-ManG-Man

        13.3k93566




        13.3k93566













        • For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

          – Peter Cordes
          3 hours ago











        • Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

          – Roger Lipscombe
          2 hours ago



















        • For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

          – Peter Cordes
          3 hours ago











        • Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

          – Roger Lipscombe
          2 hours ago

















        For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

        – Peter Cordes
        3 hours ago





        For very small projects, gcc -O3 -march=native -fwhole-program *.c is basically fine for an edit / compile / profile cycle. But you still want a Makefile for other people to use. Being able to use -fwhole-program is a fun advantage of compiling everything together, but -flto normally gives you pretty much the same optimizations.

        – Peter Cordes
        3 hours ago













        Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

        – Roger Lipscombe
        2 hours ago





        Once I start adding switches to the compiler command line (even for one source file), I find it gets tricky to remember them the next time. Occasionally I'll just put a comment in the source file, but at that point I should just use a Makefile...

        – Roger Lipscombe
        2 hours ago













        4














        Even with small project it can be helpful keeping the dependency logic under control and builds automated. I also used it to trigger installs and deinstallations, so it was a main switch resetting the stage.






        share|improve this answer




























          4














          Even with small project it can be helpful keeping the dependency logic under control and builds automated. I also used it to trigger installs and deinstallations, so it was a main switch resetting the stage.






          share|improve this answer


























            4












            4








            4







            Even with small project it can be helpful keeping the dependency logic under control and builds automated. I also used it to trigger installs and deinstallations, so it was a main switch resetting the stage.






            share|improve this answer













            Even with small project it can be helpful keeping the dependency logic under control and builds automated. I also used it to trigger installs and deinstallations, so it was a main switch resetting the stage.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 7 hours ago









            TomaszTomasz

            9,91652966




            9,91652966























                1














                A lot of other people are getting into the details of more complex makefiles and a lot of the complexity that comes with them. I typically use makefiles for a completely different reason:



                I don't want to remember anything.



                Even if your project is really boring and simple, and you don't use makefiles "correctly":



                all:
                gcc main.c -o project


                I don't need to think about it or treat it any differently than a project that's more complex:



                all:
                gcc libA.c libB.c main.c -o project2


                Or if I specified flags (e.g. -O2) I don't need to remember what they were.



                Also, if you start with a simple makefile, and you need to merge/refactor things later, you don't need to remember to build every project differently.






                share|improve this answer




























                  1














                  A lot of other people are getting into the details of more complex makefiles and a lot of the complexity that comes with them. I typically use makefiles for a completely different reason:



                  I don't want to remember anything.



                  Even if your project is really boring and simple, and you don't use makefiles "correctly":



                  all:
                  gcc main.c -o project


                  I don't need to think about it or treat it any differently than a project that's more complex:



                  all:
                  gcc libA.c libB.c main.c -o project2


                  Or if I specified flags (e.g. -O2) I don't need to remember what they were.



                  Also, if you start with a simple makefile, and you need to merge/refactor things later, you don't need to remember to build every project differently.






                  share|improve this answer


























                    1












                    1








                    1







                    A lot of other people are getting into the details of more complex makefiles and a lot of the complexity that comes with them. I typically use makefiles for a completely different reason:



                    I don't want to remember anything.



                    Even if your project is really boring and simple, and you don't use makefiles "correctly":



                    all:
                    gcc main.c -o project


                    I don't need to think about it or treat it any differently than a project that's more complex:



                    all:
                    gcc libA.c libB.c main.c -o project2


                    Or if I specified flags (e.g. -O2) I don't need to remember what they were.



                    Also, if you start with a simple makefile, and you need to merge/refactor things later, you don't need to remember to build every project differently.






                    share|improve this answer













                    A lot of other people are getting into the details of more complex makefiles and a lot of the complexity that comes with them. I typically use makefiles for a completely different reason:



                    I don't want to remember anything.



                    Even if your project is really boring and simple, and you don't use makefiles "correctly":



                    all:
                    gcc main.c -o project


                    I don't need to think about it or treat it any differently than a project that's more complex:



                    all:
                    gcc libA.c libB.c main.c -o project2


                    Or if I specified flags (e.g. -O2) I don't need to remember what they were.



                    Also, if you start with a simple makefile, and you need to merge/refactor things later, you don't need to remember to build every project differently.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 1 hour ago









                    Stack TracerStack Tracer

                    1134




                    1134























                        0














                        If you link your app from 2 sources (.c files) , you do not need to recompile each file, but only the changed one if you are using make.



                        Also, I will give you example from BSD world. They have framework of system-based Makefiles. They provide you paths to system directories and have targets to install your software and manual pages.



                        For example, you just wrote beer.c app and manual for it called beer.6.
                        You create Makefile:



                        PROG=   beer
                        MAN= beer.6

                        .include <bsd.prog.mk>


                        ..and call make install. It automatically compiles and installs your app to /usr/bin and compiles and installs your man page to the place where man can find it. You just installed your app with one simple command!



                        Very convenient and absolutely transparent for anyone who is familiar with BSD.
                        Much better than manual script.






                        share|improve this answer




























                          0














                          If you link your app from 2 sources (.c files) , you do not need to recompile each file, but only the changed one if you are using make.



                          Also, I will give you example from BSD world. They have framework of system-based Makefiles. They provide you paths to system directories and have targets to install your software and manual pages.



                          For example, you just wrote beer.c app and manual for it called beer.6.
                          You create Makefile:



                          PROG=   beer
                          MAN= beer.6

                          .include <bsd.prog.mk>


                          ..and call make install. It automatically compiles and installs your app to /usr/bin and compiles and installs your man page to the place where man can find it. You just installed your app with one simple command!



                          Very convenient and absolutely transparent for anyone who is familiar with BSD.
                          Much better than manual script.






                          share|improve this answer


























                            0












                            0








                            0







                            If you link your app from 2 sources (.c files) , you do not need to recompile each file, but only the changed one if you are using make.



                            Also, I will give you example from BSD world. They have framework of system-based Makefiles. They provide you paths to system directories and have targets to install your software and manual pages.



                            For example, you just wrote beer.c app and manual for it called beer.6.
                            You create Makefile:



                            PROG=   beer
                            MAN= beer.6

                            .include <bsd.prog.mk>


                            ..and call make install. It automatically compiles and installs your app to /usr/bin and compiles and installs your man page to the place where man can find it. You just installed your app with one simple command!



                            Very convenient and absolutely transparent for anyone who is familiar with BSD.
                            Much better than manual script.






                            share|improve this answer













                            If you link your app from 2 sources (.c files) , you do not need to recompile each file, but only the changed one if you are using make.



                            Also, I will give you example from BSD world. They have framework of system-based Makefiles. They provide you paths to system directories and have targets to install your software and manual pages.



                            For example, you just wrote beer.c app and manual for it called beer.6.
                            You create Makefile:



                            PROG=   beer
                            MAN= beer.6

                            .include <bsd.prog.mk>


                            ..and call make install. It automatically compiles and installs your app to /usr/bin and compiles and installs your man page to the place where man can find it. You just installed your app with one simple command!



                            Very convenient and absolutely transparent for anyone who is familiar with BSD.
                            Much better than manual script.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 1 hour ago









                            user996142user996142

                            40239




                            40239






















                                Goodwin Lu is a new contributor. Be nice, and check out our Code of Conduct.










                                draft saved

                                draft discarded


















                                Goodwin Lu is a new contributor. Be nice, and check out our Code of Conduct.













                                Goodwin Lu is a new contributor. Be nice, and check out our Code of Conduct.












                                Goodwin Lu is a new contributor. Be nice, and check out our Code of Conduct.
















                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503975%2fwhat-are-the-advantages-of-using-make-for-small-projects%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

                                Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

                                How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...