Skip to content

hongjundu/common-c-cpp-makefiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

common make files for building C/C++ projects

define compiler in make file

  • C project

      export COMPILER=gcc
    
  • C++ project

      export COMPILER=g++
    

local build

  • cd to source folder

      make
    

cross-build

  • install corresponding cross-compiler, take ARM cross-compiler as an example

      $ sudo apt-get install libc6-armel-cross libc6-dev-armel-cross
      $ sudo apt-get install binutils-arm-linux-gnueabi
      $ sudo apt-get install libncurses5-dev
      $ sudo apt-get install gcc-arm-linux-gnueabihf
      $ sudo apt-get install g++-arm-linux-gnueabihf
    
  • cd to source folder

      make CROSS=arm-linux-gnueabihf- TARGET_FOLDER=arm
    

About

common make files for building c/c++ projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages