From 7aeda2d105080aca81c318c92d4a7afb42060362 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 1 Aug 2021 08:23:00 -0700 Subject: [PATCH] restore old examples for compile function --- sh/compile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sh/compile b/sh/compile index 898c38a..cad9532 100755 --- a/sh/compile +++ b/sh/compile @@ -59,6 +59,30 @@ compile() { ### @- ### `compile` attempts to guess the most sane switches for any program, so that compilation may reduce to: ### ### **TODO:** restore examples. + ### + ### ```sh + ### # debug build + ### compile rd.c + ### compile debug rd.c + ### # debug build with warning/error flags defined in .-shrc + ### # (requires .zshrc for global alias expansion) + ### compile WHOA rd.c + ### # likewise for C++ + ### compile WHOA WELP rd.cc + ### compile WHOA WELP rd.cpp + ### # "derelease" build (release build with debug information) + ### compile derelease WHOA rd.c + ### # release build (with symbols stripped) + ### compile release WHOA rd.c + ### # hardened build (only useful on *nix) + ### compile hardened WHOA rd.c + ### # specifying compiler + ### compile gcc WHOA rd.c + ### compile msvc WHOA rd.c + ### compile release clang WHOA rd.c + ### # compile and execute (FIXME: writing to /tmp is a security concern) + ### compile derelease rd.c && /tmp/rd + ### ``` # FIXME: compile gcc portrend.c -lsdl # this causes mayhem!