From 18d3f45424e89dab81331bf2048a6a1e6a397f94 Mon Sep 17 00:00:00 2001 From: Tanner Robison Date: Sun, 26 Jul 2026 11:07:46 -0700 Subject: add makefile --- makefile | 14 ++++++++++++++ mandlebrot_set | Bin 0 -> 15912 bytes mandlebrot_set.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 makefile create mode 100755 mandlebrot_set diff --git a/makefile b/makefile new file mode 100644 index 0000000..e7a91f7 --- /dev/null +++ b/makefile @@ -0,0 +1,14 @@ +CC = clang +CFLAGS = -Wall -Wextra -Wpedantic +NCURSES = $(shell pkg-config --cflags --libs ncursesw) + +mandlebrot_set: mandlebrot_set.c + $(CC) $(CFLAGS) mandlebrot_set.c -o mandlebrot_set $(NCURSES) + +run: mandlebrot_set + ./mandlebrot_set + +clean: + rm -f mandlebrot_set + +.PHONY: run clean diff --git a/mandlebrot_set b/mandlebrot_set new file mode 100755 index 0000000..5de360a Binary files /dev/null and b/mandlebrot_set differ diff --git a/mandlebrot_set.c b/mandlebrot_set.c index e1311d4..50bb453 100644 --- a/mandlebrot_set.c +++ b/mandlebrot_set.c @@ -1,2 +1,32 @@ #include #include +#include +#include + +int get_next_frame(); + +int main() { + initscr(); + noecho(); //dont echo user input + cbreak(); //dont buffer user input + + start_color(); + + int max_x; + int max_y; + getmaxyx(stdscr, max_y, max_x); + + int y = max_y * 0.5; + int x = (max_x * 0.5) - 6; + + mvwprintw(stdscr, y, x, "Hello world"); + + refresh(); + + attroff(1); + attroff(2); + getch(); + endwin(); + + return 0; +} -- cgit v1.2.3