Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Why "make"?

Why "make"?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++visual-studiowcfxml
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav_
    wrote on last edited by
    #1

    This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav

    L K L CPalliniC 4 Replies Last reply
    0
    • V Vaclav_

      This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It is the same as the compiler. You can let the IDE set the options and generate the command, or you can run it yourself in a command window. Programs such as cl (the C/C++ compiler), make etc., have existed for years, long before the IDEs were developed. The IDEs just try to make life easier for you. I have a Visual Studio project that does not run the standard way so I had to create my own Makefile to build it. You are free to do that with any of your projects if you want greater control over how they are built.

      1 Reply Last reply
      0
      • V Vaclav_

        This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav

        K Offline
        K Offline
        k5054
        wrote on last edited by
        #3

        Vaclav_ wrote:

        I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ?

        Your IDE probably creates the Makefile from some sort of project database, perhaps a .proj file. Lets assume that I create a library that you would like to use, but I use a different IDE than you, which uses Project.DB files that are completely different than the .proj files your IDE uses. If my project creates a Makefile that can be used from the command line, then you don't have to figure out how to import and build the library using your IDE, or how to install and use the IDE I use. Additionally, your IDE might clobber the Makefile distributed with my project, in which case you're going to have to go try to make sure you've got all the dependencies right, which might take a lot of time. In the land of UNIX like OS (Linux, BSD, Darwin, etc), make is almost ubiquitous. If the OS doesn't ship with make, someone will probably have a version of make (e.g. gnu-make) available. That means make is, more or less, the de facto build tool.

        1 Reply Last reply
        0
        • V Vaclav_

          This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav

          L Offline
          L Offline
          leon de boer
          wrote on last edited by
          #4

          The answer to that is historic most of the original C compilers were around with DOS and Unix all we had was a command line. So on the command line you used to have to type these extremely long strings and so everyone wrote DOS batch files or unix shell scripts. Come 1976 and make was created by Stuart Feldman and it was released to public domain. Make never really took off with DOS users as by 1983 Windows 1.0 was released and a small company called Borland began with Pascal and later C as a text GUI on the windows platform. Borland - Wikipedia[^] Microsoft saw the success of Borland as a threat (they used DOS command line in house) and essentially began to mimic Borland at least on the GUI (the compiler remained a dos executable) and thus was born the first microsoft compiler tools. With no big bucks for GUI compilers being spent on linux make became a staple thing for the linux OS. Even most embedded compilers tended to stay as DOS or Windows with a couple of exceptions. So generally you could pick Windows versus Linux developers by did they know there way around make which developed it's own language. More recently GUI compiler IDE's started to pop up in linux and so they will import and work with Make files. Windows Visual Studio now can even work with make files as it is targetting linux developers although in all honesty they would like them to move to CMake. There is also a very subtle difference between windows and linux repositories because of the history that many linux programmers fail to notice. Most windows code has the header files for the C code files in the same directory, on most linux repositories you will find all the headers in an include directory (they seem to view it is good practice) and the source files elsewhere. The reason for the difference is Windows compilers have a specific search order which is same directory as C file, library directory and then user defined include directories. Under windows compiling #include is very different to #include "some.h" (the first means the C system directory the second means the user defined directory) on linux repositories that difference always seems to get lost (all the code is pubic domain none is company copyrighted) they randomly they use either -l or -L and fix it in the makefile. Under Windows you start messing around with the system directories you will get in a world of hurt (as

          L 1 Reply Last reply
          0
          • L leon de boer

            The answer to that is historic most of the original C compilers were around with DOS and Unix all we had was a command line. So on the command line you used to have to type these extremely long strings and so everyone wrote DOS batch files or unix shell scripts. Come 1976 and make was created by Stuart Feldman and it was released to public domain. Make never really took off with DOS users as by 1983 Windows 1.0 was released and a small company called Borland began with Pascal and later C as a text GUI on the windows platform. Borland - Wikipedia[^] Microsoft saw the success of Borland as a threat (they used DOS command line in house) and essentially began to mimic Borland at least on the GUI (the compiler remained a dos executable) and thus was born the first microsoft compiler tools. With no big bucks for GUI compilers being spent on linux make became a staple thing for the linux OS. Even most embedded compilers tended to stay as DOS or Windows with a couple of exceptions. So generally you could pick Windows versus Linux developers by did they know there way around make which developed it's own language. More recently GUI compiler IDE's started to pop up in linux and so they will import and work with Make files. Windows Visual Studio now can even work with make files as it is targetting linux developers although in all honesty they would like them to move to CMake. There is also a very subtle difference between windows and linux repositories because of the history that many linux programmers fail to notice. Most windows code has the header files for the C code files in the same directory, on most linux repositories you will find all the headers in an include directory (they seem to view it is good practice) and the source files elsewhere. The reason for the difference is Windows compilers have a specific search order which is same directory as C file, library directory and then user defined include directories. Under windows compiling #include is very different to #include "some.h" (the first means the C system directory the second means the user defined directory) on linux repositories that difference always seems to get lost (all the code is pubic domain none is company copyrighted) they randomly they use either -l or -L and fix it in the makefile. Under Windows you start messing around with the system directories you will get in a world of hurt (as

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            leon de boer wrote:

            all the code is pubic domain

            I now have a most strange image in my mind ... :laugh:

            1 Reply Last reply
            0
            • V Vaclav_

              This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav

              CPalliniC Offline
              CPalliniC Offline
              CPallini
              wrote on last edited by
              #6

              Quote:

              I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ?

              Possibly because I am not using an IDE.

              In testa che avete, signor di Ceprano?

              D 1 Reply Last reply
              0
              • CPalliniC CPallini

                Quote:

                I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ?

                Possibly because I am not using an IDE.

                D Offline
                D Offline
                Dar Brett 0
                wrote on last edited by
                #7

                Isn't bash an IDE?

                CPalliniC 1 Reply Last reply
                0
                • D Dar Brett 0

                  Isn't bash an IDE?

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #8

                  baid is a IDE , bash is a shell. :rolleyes:

                  In testa che avete, signor di Ceprano?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups