Skip to content

Instantly share code, notes, and snippets.

@OrangeTide
OrangeTide / makefile
Last active November 10, 2023 16:32
small and low-configuration project Makefile (GNU make required)
# small and low-configuration project Makefile (GNU make required)
# Nov 10 2023 - Jon
# usage:
# 1. place this in the directory of a small C/C++ project.
# 2. modify type= configuration option to select executable or library modes.
# 3. all c/c++ and assembler sources will be linked into a single
# executable or library.
# 4. adjust configuration options for desired compiler and linker flags.
# examples of typical usage:
# make clean
@OrangeTide
OrangeTide / gmail-mailto
Created February 18, 2024 17:46
Use GMail as default email client on Linux / Ubuntu / Raspbian / Arch
#!/bin/sh
# Installation for using GMail as your preferred application
# This is for handling mime type: x-scheme-handler/mailto
#
# Place this script in your $PATH, and mark as executable
#
# Install the .desktop file:
# cp gmail-mailto.desktop ~/.local/share/applications/
#
@OrangeTide
OrangeTide / build-systems-comparison.md
Created March 16, 2026 04:24
Comparison of build systems: Make, Plan 9 mk, Perforce Jam, Tup, and Ninja

Build Systems Comparison

A comparison of four build systems researched during the design of a new build tool. Each system represents a distinct philosophy and set of tradeoffs.

Summaries

Make (1976)

The original build tool by Stuart Feldman. Make reads a Makefile containing rules that map targets to prerequisites and shell recipes. It uses file modification timestamps to determine what needs rebuilding and supports pattern rules (%.o: %.c) for generic transformations. Make's key weakness is its lack of a real programming language — it has evolved ad-hoc features (conditionals, functions, pattern substitution) that are awkward and error-prone. Recursive make (invoking make in subdirectories) is the standard approach for multi-directory projects, but it fragments the dependency graph, leading to both correctness and performance problems at scale. Despite its limitations, make remains the most widely used build tool due to its ubiquity and simplicity for small projects.