diff options
-rw-r--r-- | Tupfile | 4 | ||||
-rwxr-xr-x | clean.sh | 10 | ||||
-rwxr-xr-x | install.sh | 13 | ||||
-rw-r--r-- | tup.config | 4 |
4 files changed, 31 insertions, 0 deletions
diff --git a/Tupfile b/Tupfile new file mode 100644 index 0000000..cff48e6 --- /dev/null +++ b/Tupfile @@ -0,0 +1,4 @@ +CFLAGS += `pkg-config --cflags raylib` `pkg-config --cflags glfw3` `pkg-config --cflags glu` `pkg-config --cflags gl` `pkg-config --cflags sdl2` `pkg-config --cflags SDL2_mixer` `pkg-config --cflags bdw-gc` +LDFLAGS += `pkg-config --libs raylib` `pkg-config --libs glfw3` `pkg-config --libs glu` `pkg-config --libs gl` `pkg-config --libs sdl2` `pkg-config --libs SDL2_mixer` `pkg-config --libs bdw-gc` +: foreach src/*.c |> @(CC) $(CFLAGS) -c %f -o %o |> @(BUILD_DIR)/obj/%B.o +: @(BUILD_DIR)/obj/*.o |> @(CC) %f -o %o $(LDFLAGS) |> @(BUILD_DIR)/bin/Pong diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..39683ec --- /dev/null +++ b/clean.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -eu + +. ./tup.config + +echo "Cleaning Project..." +set -x +rm -rf $CONFIG_BUILD_DIR +set +x +echo "Done." diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..40d2c2b --- /dev/null +++ b/install.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +source ./tup.config + +echo "Installing Project." +set -x +mkdir -p $CONFIG_INSTALL_PREFIX +cp -r ./resources $CONFIG_INSTALL_PREFIX/resources +cp -r ./docs $CONFIG_INSTALL_PREFIX/docs +install -m755 $CONFIG_BUILD_DIR/bin/Pong* $CONFIG_INSTALL_PREFIX/ +set +x +echo "Done Installing." diff --git a/tup.config b/tup.config new file mode 100644 index 0000000..226a926 --- /dev/null +++ b/tup.config @@ -0,0 +1,4 @@ +CONFIG_CC=cc +CONFIG_FLATPAK=false +CONFIG_INSTALL_PREFIX=./app +CONFIG_BUILD_DIR=./build |