Giter Club home page Giter Club logo

simple-makefile-tutorial's Introduction

I followed the Makefile tutorial from http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/

It is a very good tutorial that teaches you step by step the basics of the 'make' utility. An interesting thing I learnt is that the 'make' utility is part of the GNU collection of tools for building operating systems. The GNU collection includes a Preprocessor, Compiler and Linker.

The General process of running a C file is:

  1. Preproces: replace all DEFINE and #include references
  2. Compile: transform the C code into Assembly, but leaving the references to files for for later (linking pahse; this allows not to compile all files everytime, and have some files possible stored in a company's library)
  3. Link: link all .o files into a single output file that can be executed

When you write the command 'gcc' it means 'GNU C Compiler'. It has the following flags:

  • -o ---> output into a file: ex: gcc -o outputInThisFileName hello.c
  • -c ---> only compile the files and create the object files, do NOT link them: ex: gcc -o outputCompiledFileHere -c hello.c

simple-makefile-tutorial's People

Contributors

andreimargeloiu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.