Skip to content

๐Ÿš€ Thin, extensible and pretty Makefile for cross-platform C/C++ projects.

License

Notifications You must be signed in to change notification settings

vicalejuri/make-it-rain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Make it Rain

A collection of thin, extensible and pretty Makefiles for simple C/C++ projects.

If you find standards Makefile too complex or cumbersome, try makerain, since many hard-edges were softened and it's still GNU Makefiles.

Make it rain

Features

  • Pretty and sane interface.
  • Compatible with many compilers ( gcc, clang, vscode )
  • Cross-platform ( LINUX, WINDOWS, MAC)
  • Compatible with standard CFLAGS & LDFLAGS
  • Built-in support for doctests

Installation

  1. Copy the folder makerain to your project.
  2. Create a Makefile in the project root.
  3. Configure it to your taste:
SHELL:=/bin/bash

VERSION :=  "0.0.1"
NAME    :=  hello
TARGET  :=  Release

# Output
OUTPUT_EXE 	  := build/${NAME}

# Dependencies, assets and binary all bundled together for simple
# deployment (eg: Mac .app , flatpack, zip folder...)
OUTPUT_BUNDLE := dist/${NAME}

# Copy Assets to bundle
ASSET_FOLDER 	:= $(NAME).res

# External dependencies, like curl or openssl
# May have both shared lib (.so) and header files
DLL_FOLDER := dep

# Include folders
INCLUDES 	= include/ ext/  						# bultin and 3ยบ party
LIBS 		= m dl pthread curl jansson 			# libm, dlopen, libpthread, libcurl

# Our code & 3party
SOURCES 		= $(wildcard src/*.cpp src/*/*.cpp ext/*/*.c) 

# Entry point
MAIN_APP	= src/main.cpp
TEST_APP 	= src/testsRunner.cpp

# Include build rules
include ./makerain/Makefile

Usage

Description command
make Compile all files
make dll Compile external dependencies
make info Display build information
make run Run generated executable
make debug Run with debugger attached
make doctest Compile doctest
make test Runs doctest

HOW TO: Overwrite config options ?

Use the traditional behaviour of overwriting variables in the SHELL. For example:

Use clang as compiler

CXX=clang CX=clang make

Compiling with DEBUG symbols

TARGET=DEBUG make

Examples

A barebones App with dynamic library support is included in the directory examples.

Thanks to:

LICENSE

Simple and permissive MIT license.

Assembled in Brazil ๐Ÿ–

About

๐Ÿš€ Thin, extensible and pretty Makefile for cross-platform C/C++ projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published