How to Create a Simple Makefile - Introduction to Makefiles

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 398

  • @ArcieGaming
    @ArcieGaming 6 лет назад +138

    Makefiles have always thrown me off. I always stress them because every "tutorial" online goes super in-depth on stuff I don't really need at this point. Starting with the reference down a few lines was awesome and everything clicked when you explained it. Thank you!

  • @jonathancollett4174
    @jonathancollett4174 5 месяцев назад +22

    Wow!! 9 years later and this video still holds up and is very informative. I just created my first makefile!!

  • @AnuliaSuper
    @AnuliaSuper 8 лет назад +677

    This is one of the best tutorials I have ever seen. Your explanation is concise, straight to the point and there was no unnecessary talking. If only more tutorial makers could be like you. Great job, thanks so much! Subscribed.

  • @majinmilad
    @majinmilad 6 лет назад +134

    I logged in to my RUclips account just to leave a comment ... your tutorial is so good. I literally just learned so much I actually feel comfortable with the concept now. Thank you so much
    You presented it in a simplified format and addressed every angle (like what "-c" is included for), demonstrated the relations between the main file, the function file, the header file, and the Makefile itself, and were very visual with your cursor which helps a lot.
    I was doing this stuff for class but literally didn't understand what I was doing, was just sort of plugging and chugging the commands. I now understand. You're a very good teacher keep it up!

  • @jude-harrisonobidinnu3876
    @jude-harrisonobidinnu3876 3 года назад +10

    I haven't even completed the video and I'm already wowed by your presentation of the concept! Apt, concise and straight to the point!. Thank you so much Paul.

  • @derelicts9503
    @derelicts9503 Год назад +4

    I've started my C++ journey yesterday and I'm trying to make sense of the basics. Your tutorial is really clear and concise, thank you!!!

  • @garimachauhan9916
    @garimachauhan9916 Год назад +2

    after spending hours trying to understand makefiles...i was ready to give up but decided to give it a last shot thru ur video..thank you sooo mucch for explaining each and every line of the code!! You made my day!

  • @alireza98325
    @alireza98325 5 лет назад +84

    9:13 "so I think that was a pretty good introduction to Makefiles"
    I agree 👍👍👍

  • @jedijackattack3594
    @jedijackattack3594 4 года назад +108

    This is probably one of the best tutorials on youtube or in general for make files just for the basics. this is great buddy

  • @frederickshafer7405
    @frederickshafer7405 5 лет назад

    I have avoided using linux for coding for 3 years now because an old prof of mine explained makefiles horribly. You've helped me regain my ability to use linux again, thank you.

  • @norcal6181
    @norcal6181 7 лет назад +4

    Thank you so much for this video. I'm taking a C++ class at my local community college and I'm using Linux and Vim for my development platform. I've just been winging it with the make files which was fine when we were doing single file programs, but now we're getting into programs with 20 or 30 files. Before watching this I had my makefiles setup to where they are recompiling everything every time I compiled. I was like there has to be a better way. This is it! Thank you for the awesome information!

  • @zal9706
    @zal9706 6 лет назад +1

    it wasn't working for me until I realized that "Makefile" literally has to be named that EXACTLY, case-sensitive and all. Works, and simply explained thank you.

    •  6 лет назад +1

      you can use -f and name it difrently. But usally the default Makefile is called like that.

    • @zal9706
      @zal9706 6 лет назад

      Björn Bidar oh I didn’t know that

    • @zal9706
      @zal9706 6 лет назад

      Thanks

    •  6 лет назад

      Zal Look here for example: github.com/Thaodan/shpp/blob/master/Makefile

  • @WhileTrueThenDream
    @WhileTrueThenDream 4 года назад +2

    This is the very best makefile tutorial I have ever seen. I spent to days modifying a nightmare of mixed cpp and c files, many libraries and so on and every posible flag...and your tutorial helped me to better refresh and understand the basics. Thank you

  • @misteronsepatro7018
    @misteronsepatro7018 6 лет назад +9

    OMG your tutorial helped me so much for my projects it's really clear I understood everything easily
    people like you deserve a special place in heaven

  • @FlooferLand
    @FlooferLand 3 года назад +4

    1:17 Light mode terminalllll, my eyessssss
    Thank you for the video aswell, literally the only decent video explaining Makefiles i could find on the entirety of RUclips

    • @DariusOutdoors
      @DariusOutdoors 9 месяцев назад

      Some people like to wear shades working at the PC.

  • @_IamJr_
    @_IamJr_ 5 лет назад +1

    I have read three tutorials and seen a few videos before I landed here. After all that i endured, I was still not understanding a makefile or its concepts. After watching your video, I was enlightened. It was well explained and the example was understandable with great details even a beginner could understand. Great Job! Subscribed.

  • @jordanvert
    @jordanvert 4 года назад +2

    I never leave comments on videos but I have to say you explained this so perfectly. Very easy to understand! Great Job!

  • @joe0404
    @joe0404 8 лет назад +1

    Oh man! You saved me. I'm more into the programming side of computer science, but I'm taking a Linux commands class, as required for any comp science degree at my school. My professor spent an hour teaching this lesson, but due to a language barrier, I didn't get it, but your tutorial makes it so easy to understand. Thank you very much.

  • @JulietNovember9
    @JulietNovember9 8 лет назад

    spun my wheels for a while trying to make heads or tails using the coursework notes and other sites... this video explained everything amazingly!! you're a legend! thanks!

  • @samim.4949
    @samim.4949 4 года назад

    I can't believe this. This explanation of Makefile is so good I was able to finish my project in time with working Makefile. Thank you.

  • @NotDovahClean
    @NotDovahClean Год назад

    This is an awesome tutorial! Few days ago my prof gave a handout about how to make a Makefile but it didn’t explain how it actually works. This tutorial was a great explanation. Thank you sir!!

  • @pankajniroula4388
    @pankajniroula4388 6 лет назад

    This is the hands down the best that helps a beginner understand Makefile.

  • @mileswiggins2174
    @mileswiggins2174 2 года назад

    Finally this is like the one video that makes a lot of sense for makefiles. But since I'm inexperienced gotta start somewhere! As time goes on I will understand other videos on makefiles. Thanks!!!!!

  • @kal9001
    @kal9001 6 лет назад +1

    I've been spoiled by IDE's and now I'm stuck trying to work with a bare tool chain... more through choice and necessity as I need to get to grips with this stuff as I know it will make things easier when pulling source code and libraries from other places. Very useful information.

  • @kaviyasubramanian4908
    @kaviyasubramanian4908 4 года назад

    I was searching the explanation for make files for days....and I am so satisfied with this...great job...thank u so much..for making it so easy to understand

  • @metaljesus5334
    @metaljesus5334 2 года назад

    This dude singlehandedly explained how to make a fucking Makefile in less than what it would have taken me to finish taking a shit. You've earned a sub.

  • @JossinJax
    @JossinJax 3 года назад

    Give this man a medal. Cheers to RUclipsrs unf****ing the s***storms we endure in college.

  • @vojazzy11
    @vojazzy11 4 года назад

    Oh my god, thank you so much for a perfect explanation. To add on to what everyone else is saying - BEST tutorial I've ever seen!

  • @cheapmoviesnow
    @cheapmoviesnow 5 лет назад

    I wish more videos were like this, simple, only explaining the concept at hand. Other tutorials of more advanced programming often assume you have knowledge that leads to you being more confused

  • @christianborao4248
    @christianborao4248 5 лет назад

    Thank you so much for this video. I tried reading documentation on Makefiles but didn't understand anything. Now that I've gone through this video, I understand! Excellent introduction. I can pretty easily extend the ideas presented here to more advanced Makefiles.

  • @rafaelperes6333
    @rafaelperes6333 6 лет назад

    You really should make a small series on more advanced topics in Makefile.
    This short tutorial and introduction to Makefiles is very clear for those dealing with Makefiles for the first time.

  • @santaana36
    @santaana36 4 года назад +1

    Oh, THAT'S how Makefiles work. Best tutorial ever.

  • @johnpaul2205
    @johnpaul2205 3 года назад +1

    Y'all are so blessed to know this stuff. I can't even figure out my phone sitting God 🙏

  • @recklessroges
    @recklessroges 6 лет назад +3

    Perfect introduction to Makefile. Exactly what a person needs if they have never used Makefile before, (and you resisted the temptation to throw too much at them.)

  • @stephenjames5745
    @stephenjames5745 4 года назад

    This is the best makefile explanation I have read. It just makes so much sense. Thank you!

  • @Karaboseopa-jx1qy
    @Karaboseopa-jx1qy 6 месяцев назад

    The best explanation of makefiles i have ever seen

  • @i_o_media
    @i_o_media 2 года назад +1

    thank you such much paul this helped me clear all confusion around makefile

  • @knauxu
    @knauxu 2 года назад

    This guy explains things like he knows all the secrets of the multiverse. I am enlightened.

    • @mileswiggins2174
      @mileswiggins2174 2 года назад

      That is so true. Everything he said makes sense which is nice since I'm trying to teach myself c++

  • @alika8236
    @alika8236 4 года назад

    Thank you so much for this video. I'm a total beginner with makefiles and you cleared a lot of things in my head !

  • @anthonysmith1026
    @anthonysmith1026 4 года назад

    Probably the best tutorial I have ever seen.

  • @narutouchiha1946
    @narutouchiha1946 4 года назад

    You accomplished what my professor couldn't in 1/10th of the time.

  • @hogspog
    @hogspog 2 года назад

    legend my professor failed to explain this at all so this was a lifesaver

  • @noone-fx8dx
    @noone-fx8dx 2 года назад

    not only is this concise, this is also the only one that worked on windows

  • @davictor24
    @davictor24 4 года назад

    This is the most concise RUclips tutorial I have seen on any topic. You have earned a new subscriber :).

  • @Pawl0solidus
    @Pawl0solidus 4 года назад

    That was just what I needed! Always thought that makefiles were very complicated, but thanks to you now it's very simple to understand! Thank you vey much!!!

  • @rugmaable
    @rugmaable Год назад

    very precise. Thanks for taking the time to explain the concept. This is the first time I come across makefile and it makes perfect sense. I now fully understand how this thing works.

  • @kimutaifelix9092
    @kimutaifelix9092 8 месяцев назад

    I was getting errors at first because a small mistake, "MakeFile" instead of "Makefile" 😂😂. Thanks Paul for a great tutorial.

  • @berend109
    @berend109 3 года назад

    How was I not able to accomplish this, thank you for this simple tutorial I was able to create a makefile first try after watching this.

  • @SeanWagemans
    @SeanWagemans 7 лет назад

    Holy crap. My cs prof gave me a huge documentation page to read on how to use the make files. This made it waaaaaay easier

  • @jakeholle6065
    @jakeholle6065 9 лет назад

    Thanks! I had to learn how to write a makefile for an exam and you explained it very well. +1 subscriber

  • @MayureshKadu
    @MayureshKadu 2 года назад

    That was a great and very concise introduction to make files. I keep referring it out to people I help out as a quick intro to the topic. Thanks!

  • @JohnDoe-ki6fm
    @JohnDoe-ki6fm 3 года назад

    Thanks! I knew all this ~35 years ago. I haven't needed to write my own makefiles since, and sort of forgot some details. ;)

  • @OpenDiaryNKM
    @OpenDiaryNKM 7 лет назад +5

    I must leave a praise in comment box for this tut. Even though I knew about make file. Great explanation!

  • @breelindee4627
    @breelindee4627 5 лет назад +5

    This is a great and very informative video! You explained the concept so well, thank you for your help!

  • @eliasalabssie1965
    @eliasalabssie1965 6 лет назад +1

    you just input happiness into my life

  • @lachierox28
    @lachierox28 6 лет назад

    insanely well spoken and directed

  • @ericxue3244
    @ericxue3244 2 года назад

    Everything makes so much sense now. Well done!

  • @TUMATATAN
    @TUMATATAN 6 лет назад

    Best explanation of how something works. EVER!!! I just subscribed to your channel.

  • @hannesthiersen8170
    @hannesthiersen8170 4 года назад

    This is SO simple yet SOOO informative. Subscription deserved.

  • @mikelong3444
    @mikelong3444 3 года назад +1

    5 out of 5 STARS for this video #PaulProgramming. Your explanation is second to none. This is the second video I have watched of yours. I have LIKED and SUBSCRIBED to your channel this tutorial. Thanks for helping us all that need the help.

  • @KaruniaSentosa
    @KaruniaSentosa 5 лет назад +1

    I love this tutorial! Clean explanation and very understandable. Thank you for making this tutorial!

  • @royanaskhat8300
    @royanaskhat8300 3 года назад

    Best tutorial about makefile! Very well explained! Thank you for making this video!

  • @mackiej
    @mackiej 4 года назад

    Thank you for the clear and straightforward explanation of the makefile!

  • @freeruninja
    @freeruninja 7 лет назад

    legit insane tutorial seems pretty simple when you explain.

  • @ar9iem
    @ar9iem 4 года назад

    Great tutorial. Probably the best on "Makefiles".

  • @ngoako
    @ngoako 3 года назад +1

    Best tutorial on makefiles

  • @LOGICOMA
    @LOGICOMA 3 года назад

    Excellent explanation! Quick, clear and concise! Top job, mate!

  • @mekacheradem4720
    @mekacheradem4720 7 лет назад +2

    Man you're a legend thanks ! you would be a perfect teacher...Subscribed !

  • @MrTomro
    @MrTomro 4 года назад

    Damn this is the best makefile video on youtube

  • @Jarwin-GG
    @Jarwin-GG 11 месяцев назад

    The best makefile tutorial, if you don´t leave with mastery of it´s usage i´s because you didn´t watch the video.

  • @TheTaekwondo1996
    @TheTaekwondo1996 8 месяцев назад

    Thanks a lot for this informative tutorial. It's one of the great tutorials about makefiles.

  •  6 лет назад +9

    Better use $(CXX) instead of g++. This makes sure that the default C++ compiler of the system is used. CC is the C compiler on the other hand.

    • @recklessroges
      @recklessroges 6 лет назад +9

      I see your point, but that should be in the next tutorial, not this one.

  • @edin1256
    @edin1256 3 года назад

    This was one of those tutorials that wasn't excruciatingly slow but still covered everything in great detail. Good job! It was very good.

  • @ricardohincapie1537
    @ricardohincapie1537 4 года назад

    Nice way of explain it. I was so confused before I saw this tuto. Thanks!

  • @MsJoelbispo
    @MsJoelbispo 3 года назад

    best tuto of makefile ever.
    I am saying this from 2021.
    See you.

  • @mertcokelek5420
    @mertcokelek5420 6 лет назад

    Brilliant! Thank you so much. Very clean and smooth explanation. Greetings from Turkey

  • @Prashanth_650
    @Prashanth_650 Год назад

    Tutorial is so good and very easy to understand. Thanks for the video and looking forward to see many videos like this.

  • @wadehawkins2310
    @wadehawkins2310 4 года назад

    Best video ever. Simple and informative.

  • @jawnvawn
    @jawnvawn Год назад

    Really good intro for an intermediate topic. Thanks for making the tutorial!

  • @JustNook
    @JustNook 6 лет назад

    Awesome video!! Helped my finish my computer science Homework!!

  • @embeddedsystemsguy
    @embeddedsystemsguy 3 года назад

    Holy I've seen some complicated tutorials and article on makefiles but boy after seeing this video, it seems so simple. lol

  • @umeshpant3398
    @umeshpant3398 3 года назад

    Thanks Paul.
    You have helped alot!!
    Love from India.

  • @djpeterson7479
    @djpeterson7479 3 года назад

    Great video! I'm developing on Windows and am using Clang. I ran into a weird issue and would like to help others who run into it as well:
    In my case, I used `clang` instead of `g++` (I'm compiling C files) but when I ran `make` my `clang` commands were mysteriously changed to `cc` which is Microsoft's C compiler. I was confused by this as what I had typed was not what was being compiled. The answer is to add CC= at the top of your file. For me, that looked like this:
    CC=clang
    output: ...
    Alternatively if you don't want to specify the compiler in your make file, you can run make like this:
    make CC=clang
    Of course, if you are using `g++` like the tutorial in this video, simply change `clang` to `g++`. I hope this helps others who are using GCC Make on Windows and are running into compiler hijacking.

  • @maxholthaus5528
    @maxholthaus5528 6 лет назад

    Thanks a lot, clear and concise. Other videos on make are much longer and way more complicated.

  • @GabrielSoares-mt5il
    @GabrielSoares-mt5il 9 месяцев назад

    Thanks for the straight-forward to the point tutorial!

  • @TheSkarabeush
    @TheSkarabeush 2 года назад

    Thx a ton, like others wrote below I understood it all after watching your video, thank you.

  • @李樵风
    @李樵风 3 года назад

    A quick and handy introduction. Great for beginners. Thanks!

  • @benjamindrhee
    @benjamindrhee 5 месяцев назад

    That was indeed a pretty good introduction to Makefiles

  • @helantopia
    @helantopia 3 года назад +1

    why did my Uni have to make it seem so complicated??? I was struggling a lot with Makefiles and had no idea what the commands even mean so thanks a lot :)

  • @jonas14812
    @jonas14812 3 года назад

    Great tutorial! Simple, straightforward and easily understandable! Nice one

  • @kerimgueney
    @kerimgueney 2 года назад

    Clean and concise introduction. Great stuff.

  • @HeatWill
    @HeatWill 2 года назад

    Thank you so much for this. My professor did not explain it nearly as well.

  • @dcjunkieful
    @dcjunkieful 6 лет назад

    also you can run the command:
    open output
    (once the executable has been made)
    and a new window will open the executable with the desired message

  • @BusinessBuzz
    @BusinessBuzz 5 лет назад +3

    Awesome video! Perfectly explained

  • @malkavian6275
    @malkavian6275 3 года назад

    Literally a life saver

  • @Asimov16
    @Asimov16 5 лет назад +3

    excellent tutorial, but how would we link a pre-written library to out project?

  • @tedx777
    @tedx777 4 года назад

    Thanks you very much, the tutorial so very clear, easy to understand and remember.

  • @ivanvostrilov1578
    @ivanvostrilov1578 4 года назад

    I watching that in 2020. It is real good tutorial !

  • @KingGrio
    @KingGrio 3 года назад

    Thank you for a very simple and clear explanation

  • @FeedehC
    @FeedehC 4 года назад

    Really great. Well explained and brief, just what I needed. Thanks a lot!