mandelbrot

mandelbrot.git
git clone git://git.lenczewski.org/mandelbrot.git
Log | Files | Refs

commit c55134c703ae3a7384f96c0290c15ebf444bac09
Author: MikoĊ‚aj Lenczewski <mblenczewski@gmail.com>
Date:   Sat, 18 Jan 2025 20:00:47 +0000

Initial commit

Diffstat:
A.editorconfig | 18++++++++++++++++++
A.gitignore | 6++++++
Abuild.sh | 15+++++++++++++++
Aclean.sh | 5+++++
Adebug.sh | 5+++++
Asrc/main.c | 9+++++++++
Asrc/mandelbrot.h | 7+++++++
7 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/.editorconfig b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[*.{c,h}] +indent_style = tab +indent_size = 8 + +[*.{sh}] +indent_style = tab +indent_size = 8 + +[*.{md,txt}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore @@ -0,0 +1,6 @@ +# build artefacts +bin/ + +# per-user files +**/.*.swp +imgui.ini diff --git a/build.sh b/build.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +CC="${CC:-clang}" + +WARNINGS="-Wall -Wextra -Wpedantic ${WERROR:+-Werror}" + +CFLAGS="-std=c11 -g -O0" +CPPFLAGS="" +LDFLAGS="" + +set -ex + +mkdir -p bin + +$CC -o bin/mandelbrot src/main.c $WARNINGS $CFLAGS $CPPFLAGS $LDFLAGS diff --git a/clean.sh b/clean.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +rm -rf bin/ diff --git a/debug.sh b/debug.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +lldbgui -- bin/mandelbrot $@ diff --git a/src/main.c b/src/main.c @@ -0,0 +1,9 @@ +#include "mandelbrot.h" + +int +main(int argc, char **argv) +{ + printf("Hello, World!\n"); + + return 0; +} diff --git a/src/mandelbrot.h b/src/mandelbrot.h @@ -0,0 +1,7 @@ +#ifndef MANDELBROT_H +#define MANDELBROT_H + +#include <assert.h> +#include <stdio.h> + +#endif /* MANDELBROT_H */