Using make and writing Makefile ( in C++ or C )

In this Video we will see How to use make command and make file and How to make SIMPLE C++ Makefile. A makefile is a specially formatted text file that a UNIX program called ‘make’ can interpret. Basically, the makefile contains a list of requirements for a program to be ‘up to date.’ The make program looks at these requirements, checks the timestamps on all the source-files listed in the makefile, and re-compiles any files which have an out-of-date timestamp. generally GCC and Make is used to to compile, link and build your c or C++ program. This is A Simple Makefile Tutorial in which you will learn how to write a makefiles with good makefile example. I will explainn What is a makefile ? Makefile with sub-directories, Makefile steps, Make File Tutorial, makefile c++ tutorial, make file tutorial, how to make software in c++, makefile tutorial g++, makefile template c++.

————————-Follow——————-
My Website – http://www.codebind.com
My Blog – https://goo.gl/Nd2pFn
My Facebook Page – https://goo.gl/eLp2cQ
Google+ – https://goo.gl/lvC5FX
Twitter – https://twitter.com/ProgrammingKnow
Pinterest – https://goo.gl/kCInUp
Text Case Converter – https://goo.gl/pVpcwL
Epoch Timestamp Converter – https://goo.gl/Zedjo5
Decimal – Binary – Hexadecimal Converter – https://goo.gl/rkX3JE
8-bit Checksum Calculator – https://goo.gl/inxvIT
————————-Stuff I use to make videos ——————-
Stuff I use to make videos
Windows notebook – http://amzn.to/2zcXPyF
Apple MacBook Pro – http://amzn.to/2BTJBZ7
Desktop – http://amzn.to/2zct252
Microphone – http://amzn.to/2zcYbW1
notebook mouse – http://amzn.to/2BVs4Q3

Comments

Christopher Thomas says:

I know it’s an old video, but is is possible to not have to list out each function independently? Such as instead of doing main.o: main.cpp function1.o: function.cpp… we can use some type of wildcard such as *.o : *.cpp?

hadi says:

Printf(“Thanks a lot , Perfect”);

TropicalPriest says:

Thanks, great tutorial. Makefiles were pretty confusing. But, now that I’ve watched you build one, I have a much better understanding of their functionality. Thank you. Loved the video. Favorited your website, as well.

Akash R says:

Wonderful simple and best… -_-

Raghuram Krishnaswami says:

Very nice video.

gujeff says:

Hello Sir, what does | at below command mean? Thanks
$(C_OBJS) $(A_OBJS): | $(OBJ_DIR) kernel_cfg.c

Fatih Güven says:

the sound is too noisy.

Giacomo Mellone says:

Thanks, you made my day.

Peterolen says:

You should also make the included files dependencies, otherwise it might not work correctly if you update one of the header files.

main.o: main.cpp *functions.h*
g++ -c main.cpp

רון גימפלביץ says:

good for a clean start. thanks

Ajay G says:

superb explanation…!keep it up Bro..!

Waseem Ali says:

Very informative lectures. My question is why did not you add the $(CFLAGS) with hello target in second line:
hell: main.o function1.o function2.o
$(CC) main.o function1.o function2.o -o hello

Blau Blue says:

Thank you very much my hero! :)

Pickle Pee says:

YOU THE BOSS.

Ovi Hussain says:

Good explanation dude

Mabrin says:

make load
Makefile:2: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

and Makefile contains
load :os_startup.xsm
./xfs-interface

NAMAN ALLAWADHI says:

@5:15, Makefile was not saved with “compile:”

Prabhakar Jha says:

pro tip 1.5x

Isan Rivkin says:

Very nice, thank you :)

abul kasim says:

Thanks . Make file is explained very nicely.

manojkumar subramaniam says:

Great tutorial but it’s too basic, should better if you include more about variables, pattern matching

Moath Momani says:

thank you

NAMAN ALLAWADHI says:

rm -rf *o will remove hello as well :)

Rickety Cricket says:

thank you, i found this this vid very useful :)

Praveen S. H. says:

Thank you

Tawanda Diza says:

This was awesome, Thank you so much for this

Armchair Pundit says:

great video!

jyotirmaya ojha says:

Good work, amazing tutorial.

Sherry Zhang says:

thanks,it helps a lot.

Drew Bosco says:

Just wanted to drop a comment saying that this video really helped me. Last assignment of the quarter and was having a really rough time with Makefile. Your tutorial was way better than my teachers lol. Thanks!

Bilal Mellouki says:

Merci

Karlsson600 says:

Pretty nice, but THANKS GOD for 1.5X speed button, 20 mins on this, damn…

מיכאל קפלן says:

excellent!!

Arash Esfandiari says:

omg this guy talks so slow I lost all my brain cells

Leon Duan says:

Thanks you very much!!!

Tukaram Gaikwad says:

Thanks Sir
Great tutorial

Twicken says:

awesome, thank you for this. Its the only good make file tutorial ive seen and been able to understand!

Vivek Panchal says:

Helpful tutorial.

Volo says:

FINALLY! the video I’ve been looking for to explain makefiles and the process of creating them. Thank you so much!

Shivam Sharma says:

If someone wants the code here you go – https://github.com/jack17529/Makefile-GNU/tree/master/Makefile%20001

Emailos667 says:

okey?

Hari Krishna says:

thank you

Gurpreet Singh says:

Sir can you make a video for making operating system by c++

Sara Serrano says:

Mersi sinyó es mereix un like!!

Ak Videos says:

how to make Trident in c++ bro tell me how to do plz

Mani Kanta says:

Dude. Please prepare well before making a video, don’t end up saying the same things again and again or confuse people which makes the viewers unpleasant in viewing it. By the way thanks for the video. It’s very helpful.

Satish Prabhu says:

can you please help me with how to open those .so files like libphpcpp.so and .elf files in Linux

Write a comment

*

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours