2026-08-29 09:02:47 +02:00
2026-08-29 04:09:18 +02:00
2026-08-29 09:02:47 +02:00
2026-08-29 08:37:04 +02:00

makemake is a pure POSIX-compliant (.POSIX), multi-threaded build template for C projects. It utilizes a dynamic build graph generator, requires zero GNU or BSD extensions, and runs natively on any standard UNIX shell (/bin/sh).

Quick Start

  • Place .c files in source_code/ and .h files in includes/.
  • Run make init once to bootstrap the project layout.
  • Run make -j8 debug to compile incrementally and in parallel.

Make Targets

Target Description
make / make help Prints basic usage instructions and target overviews.
make init Creates required project directories (source_code, includes, output, config) and starter templates.
make debug Dynamically builds a parallel-safe dependency graph and compiles using DEBUG_FLAGS (-g3, -O0, UBSan).
make fast Compiles an optimized release build using RELEASE_FLAGS (-O2, -s, NDEBUG) without modifying the version string.
make release Bumps the version using an automated timestamp (_YY.DAY.HH.MMSS) and compiles an optimized release binary.
make clean Wipes the output/ directory and temporary build scripts inside config/.

Customization Guide

  • How to change the compiler: Edit the CC = gcc variable at the top of the file to use clang or other compilers.
  • How to change the C standard being used: Locate CFLAGS and modify -std=c17 to your preferred standard (e.g., -std=c11, -std=c99) etc.
  • Modifying Warning Strictness: Add, or remove specific flags within the CFLAGS block. Removing -Werror will allow compilation to continue past warnings.
  • Linking External Libraries (e.g., Raylib): Locate the debug, fast, and release targets in the Makefile. Find the final linking step ($(CC) $(CFLAGS) ... -o $$OUT $$OBJS) and append your static library paths or system link flags (e.g., -lraylib -lGL -lm -lpthread -ldl -lrt -lX11).
Description
a sub 200 line POSIX makefile which simplifies the make process for C projects.
Readme AGPL-3.0 69 KiB
Languages
Makefile 100%