Skip to content
/ mkgen Public

A generic makefile generator for .c, .cpp, .sh files.

Notifications You must be signed in to change notification settings

JohnKaul/mkgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkgen

BRIEF

This shell script will scan the folders and sub folders looking for *.c and *.h files and generate a simple makefile.

By default, this script will look for .c and .h files but the -t option can be used to search for other file types such as .cpp, .sh, etc.. When this script creates the makefile for .c files, a compiler of 'CC' is used and when .cpp files is specified, the compiler is 'C++'.

SYNOPSIS

mkgen -n name [-t "*.c"]

OPTIONS

-n name - A name for the target.

-t type - A file type to look for. Currently, this script will accept: *.c, *.cpp, *.sh types (default is *.c). If *.c or .cpp called for, header files (.h) file are also looked for and listed in makefile and placed as a dependency for the building of main. When specifying *.sh files as the type, no header files are looked for but the CC is set to "chmod" (-i.e., a directory of *.sh files will need a makefile for easy installation vs compilation).

EXAMPLES

To create a makefile for all *.c file under the subdirectory:

 % mkgen -n foo

To create a makefile for all *.cpp files under the subdirectory:

 % mkgen -n foo -t *.cpp

To create a makefile for all *.sh files under the subdirectory:

 % mkgen -n foo -t *.sh

DOWNLOAD INSTRUCTIONS

To clone a copy:

$ cd ~/<place>/<you>/<keep>/<your>/<code>
$ git clone git@git.local:john/mkgen.git

BUILD INSTRUCTIONS

$ cd mkgen
$ make ; make install

CONTRIBUTION GUIDELINES

Git Standards

Commiting

  1. Commit each file as changes are made
  2. Do not commit files in batch
  3. Please prefix all commits with the file you are committing
  4. Separate subject from body with a blank line
  5. Limit the subject line to 50 characters
  6. Capitalize the subject line
  7. Do not end the subject line with a period
  8. Use the imperative mood in the subject line
  9. Wrap the body at 72 characters
  10. Use the body to explain what and why vs. how

HISTORY

Created for my personal use.

AUTHOR

  • John Kaul

About

A generic makefile generator for .c, .cpp, .sh files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published