aboutsummaryrefslogtreecommitdiff
path: root/blobheader
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-16 12:05:48 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-16 12:05:48 +0200
commit548fcede95d44a3486e43f24302809792754861a (patch)
tree60b27e52b1d3a6826c03e943141184541bb864c5 /blobheader
parent83ed40fd01120e1b46dba5d2bac895862731196d (diff)
WIP fragment shader hello world
Diffstat (limited to 'blobheader')
-rwxr-xr-xblobheader15
1 files changed, 15 insertions, 0 deletions
diff --git a/blobheader b/blobheader
new file mode 100755
index 0000000..c188205
--- /dev/null
+++ b/blobheader
@@ -0,0 +1,15 @@
+#!/bin/sh
+source="$1"
+symbol_base="$(echo "$source" | tr '[:punct:]' '_')"
+cat << EOF
+#pragma once
+// NOTE: THIS FILE IS GENERATED, DO NOT EDIT
+#include <stddef.h>
+
+extern char _binary_${symbol_base}_start;
+extern char _binary_${symbol_base}_end;
+
+#define ${symbol_base} ((const char* const)(&_binary_${symbol_base}_start))
+#define ${symbol_base}_size ((size_t)(&_binary_${symbol_base}_end - &_binary_${symbol_base}_start))
+
+EOF