Skip to content

A Makefile and directory structure for building new C Projects or Libraries

License

Notifications You must be signed in to change notification settings

lpsantil/NewProj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewProj

A Makefile and directory structure for building new C Projects or Libraries

Howto use NewProj

  • Clone or fork this repo
  • Remove the .git folder and .gitignore file (if need be)
  • Rename LICENSE to LICENSE.Makefile
  • Rename README.md to README.Makefile.md
  • Customize the project layout and Makefile to your needs

If you're building an binary,

  • In Makefile, define EXE
  • Put your code in src/
  • Put your headers in src/inc/
  • Put your tests in t/
  • Then you can type make, make test, make install, make showconfig, make WITH_DEBUG=1, make WITH_PROFILING=1

If you're building a library

  • In Makefile, define LNK
  • Put your code in src/lib/
  • Put your headers in include/
  • Put your tests in t/
  • Then you can type make, make test, make install, make showconfig, make WITH_DEBUG=1, make WITH_PROFILING=1

With watch installed, you can do continuous integration, test, or deployment.

  • For continuous integration (make clean all), type make start_ci. To kill it, type make stop_ci
  • For continuous test (make test), type make start_ct. To kill it, type make stop_cd
  • For continuous deployment (make install), type make start_cd. To kill it, type make stop_cd

You can also customize CFLAGS, LDFLAGS, DESTDIR from the command line or in the Makefile

About

A Makefile and directory structure for building new C Projects or Libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages