From 57395ff71977bfc66eea3211ebb949b6febedfbf Mon Sep 17 00:00:00 2001 From: igor Date: Fri, 10 Nov 2023 12:57:08 -0800 Subject: [PATCH] Now you can change FPS at make. --- Makefile | 5 +++-- README.md | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4e4ac93..9f5f5ff 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ CC=clang +DFLAGS= FLAGS=-Wall -Wextra -g LIBS=-I/opt/homebrew/include -I/opt/homebrew/include/SDL2 -L/opt/homebrew/lib -lSDL2 -lSDL2_ttf @@ -6,8 +7,8 @@ all: clean build build: pingpong -pingpong: pingpong.c - ${CC} ${FLAGS} ${LIBS} pingpong.c -o pingpong +pingpong: pingpong.c queue.c + ${CC} ${FLAGS} ${DFLAGS} ${LIBS} pingpong.c queue.c -o pingpong clean: rm -rf pingpong.dSYM pingpong diff --git a/README.md b/README.md index 82ebb0c..ec5323f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,19 @@ # Build For MacOS: -`make` + +``` +make + +``` + +# FPS +``` +make DFLAGS="-D FPS=30" +``` For other platforms modify flags in the Makefile. # Run -`./pingpong` +``` +./pingpong +```