diff options
author | Charadon <dev@iotib.net> | 2022-05-30 21:33:52 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-05-30 21:33:52 -0400 |
commit | b35d42e0ec41370be618ad59312786ec3795a5e7 (patch) | |
tree | 54ee6c284c4eab3ea49148877f35799524b81f73 /Makefile | |
parent | 88cf68f4cfd15a65750439bb6bf40a304090ed2d (diff) | |
download | Pong-C-b35d42e0ec41370be618ad59312786ec3795a5e7.tar.gz |
Makefile stuff
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Makefile b/Makefile index 153d346..8f393bf 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,29 @@ 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` +CFLAGS = -Og -Wall -std=c11 -Isrc/ -Iraylib/src +LDFLAGS = -lGL -lm -lpthread -ldl -lrt -lX11 -all: check_deps build pong - +all: build_deps build pong -check_deps: - @echo "Checking for dependencies..." - @printf "Raylib | " - @$(PKG_CONF) $(PKG_CONF_ARGS) raylib +build_deps: + cd raylib/src && $(MAKE) PLATFORM=PLATFORM_DESKTOP 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 - + $(CC) $? -o $@ raylib/src/libraylib.a $(LDFLAGS) + +install: + mkdir -p app + install -Dm755 ./pong app/pong + cp -r resources app/resources + +install_flatpak: + mkdir -p /app/Pong + install -Dm755 ./pong /app/Pong/pong + cp -r resources/ /app/Pong/resources + clean: rm -fv *.o rm -fv pong + cd raylib/src && $(MAKE) clean |