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