c-compiling and make

Make is a very useful tool and makes compiling very easy. Let’s take classical Hello World as an example. You can save the following file as hello.c

Now you can compile the code in linux box with a command

and then run it with

You can also make a simple makefile. For example you can give compiler flags to compiler with a following makefile. Save it as makefile to your programming directory

It means that the make gives the flags to c compiler. -g adds debug symbols (if you are using a debugger),  -Wall gives all warnings, -std=gnu11 uses c11 standard which is the latest c-standard and -o3 optimizes for speed.


3 thoughts on “c-compiling and make

  1. bystrodengi

    MinGW: MinGW (Minimalist GNU for Windows) is a port of the GNU Compiler Collection (GCC) and GNU Binutils for use in Windows. It also included MSYS (Minimal System), which is basically a Bourne shell (

  2. Calvinwes

    How much can I earn per day? At least $ 15 000 a day.
    The CryptoCode is the future of online trading using the fast growing cryptocurrency market.
    Our members are the lucky few who have seized the opportunity to invest and have made a fortune from their cozy four walls.
    Suitable for everyone – Never traded before? No need to worry, we will do everything for you
    It only takes a few minutes to get started and work 24/7
    We don’t want your money, not even a cent. The software is free of charge.
    Customer service is available 24/7 for all of your needs

    Pros and Cons of Ripple and Bitcoin.
    If you’re looking for inspiration, check out how Nathan Barry founder of ConvertKit was able to grow his software startup.
    That is how they attract your attention. I find this ridiculous but there are, yet, people falling into their traps.
    Thansk Lynn! We will work on getting this updated.
    Remember, only join the payment processor that you need.


Leave a Reply

Your email address will not be published. Required fields are marked *