From b1de6008bdfbd5bdeb62d2d3dad953019555556b Mon Sep 17 00:00:00 2001 From: Charadon Date: Mon, 30 May 2022 21:07:45 -0400 Subject: Initial Commit --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..153d346 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CC := gcc +CFLAGS = -Og -Wall -std=c11 -Isrc/ +LDFLAGS = +PKG_CONF := pkg-config +PKG_CONF_ARGS = --exists --modversion +PKG_CONF_LDFLAGS = `pkgconf --libs raylib` +PKG_CONF_CFLAGS = `pkgconf --cflags raylib` + +all: check_deps build pong + + +check_deps: + @echo "Checking for dependencies..." + @printf "Raylib | " + @$(PKG_CONF) $(PKG_CONF_ARGS) raylib + +build: src/main.c src/enemy.c src/ball.c src/title.c + $(CC) $(CFLAGS) $(PKG_CONF_CFLAGS) -c $? + +pong: main.o enemy.o ball.o title.o + $(CC) $? -o $@ $(LDFLAGS) $(PKG_CONF_LDFLAGS) -lGL -lm -lpthread -ldl -lrt -lX11 + +clean: + rm -fv *.o + rm -fv pong -- cgit 1.4.1-2-gfad0