blob: 153d3466cc6560fc766e8fdad6a9947358f6034f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
|