diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-06-15 09:26:51 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-06-15 09:26:51 +0300 |
| commit | 8ed31461b4b1f357a0d8cefda0b3bcceffb7c93d (patch) | |
| tree | c81326d068d425e113a0974ba4e094a746ef1e8b /fwdc | |
| parent | db3809488805fbdcd9d726d9ed45ad7335812bd1 (diff) | |
| download | fwd-master.tar.gz fwd-master.zip | |
Diffstat (limited to 'fwdc')
| -rwxr-xr-x | fwdc | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/sh +# helper script for compiling a fwd program. +# assumes it is being run from the root dir of the fwd sources. + +if [ "$#" -ne 2 ]; then + echo "usage: fwdc <input file> <output binary>" + echo "currently also produces <output binary>.c for inspection" + exit 1 +fi + +SRC="$1" +DST="$2" + +./fwd "$SRC" > "$DST".c + +cc -O3 -mno-sse \ + -L mod -I include -I lib \ + -Wl,-rpath=$PWD/mod \ + "$DST".c -o "$DST" \ + -lfwdio -lfwdmem -lfwdutil |
