diff --git a/build.sh b/build.sh index 521a700..20d3449 100644 --- a/build.sh +++ b/build.sh @@ -1,9 +1,10 @@ #!/usr/bin/env sh CFLAGS="-Wall -Wextra -Wpedantic -Wswitch-enum -Werror -std=c23 -ggdb" +LDFLAGS="-lm -lraylib" SRC="main.c" OUT="main.out" set -xe -cc $CFLAGS -o $OUT $SRC; +cc $CFLAGS -o $OUT $SRC $LDFLAGS; diff --git a/main.c b/main.c index cf1aaeb..d7c5c8f 100644 --- a/main.c +++ b/main.c @@ -4,11 +4,24 @@ * License: See end of file */ +#include #include +#define WIDTH 800 +#define HEIGHT 600 + int main(void) { - puts("Hello, world!"); + InitWindow(WIDTH, HEIGHT, "CompLife"); + SetTargetFPS(60); + while (!WindowShouldClose()) + { + BeginDrawing(); + ClearBackground(BLACK); + DrawFPS(0, 0); + EndDrawing(); + } + CloseWindow(); return 0; }