From 6ba9adff2f84a4dde9b6e4e3c4440c7f5a70d868 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 27 Apr 2026 10:11:12 +1000 Subject: [PATCH] Set up a basic submodule --- .gitignore | 53 ++++++++++++++++++++++++++++++++++++++++ .gitmodules | 3 +++ LICENSE | 22 +++++++++++------ README.md | 1 + Toy | 1 + makefile | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 160000 Toy create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4bdbcec --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb +*.log + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..656130e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Toy"] + path = Toy + url = git@github.com:krgamestudios/Toy.git diff --git a/LICENSE b/LICENSE index e0e3605..f470f85 100644 --- a/LICENSE +++ b/LICENSE @@ -1,11 +1,17 @@ -zlib License +Copyright (c) 2026 Kayne Ruse, KR Game Studios -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: - 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. diff --git a/README.md b/README.md index 209ba1d..82ff615 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Pactoy +A test game for The Toy Programming Langauge. diff --git a/Toy b/Toy new file mode 160000 index 0000000..6ebbcc4 --- /dev/null +++ b/Toy @@ -0,0 +1 @@ +Subproject commit 6ebbcc45a3db8190b97ccf37923dd5a137a72604 diff --git a/makefile b/makefile new file mode 100644 index 0000000..7f17b61 --- /dev/null +++ b/makefile @@ -0,0 +1,70 @@ +#compiler settings reference +#CC=gcc +#CFLAGS+=-std=c17 -g -Wall -Werror -Wextra -Wpedantic -Wformat=2 -Wno-newline-eof +#LIBS+=-lm +#LDFLAGS+= + +#directories (override the build destination) +export TOY_SOURCEDIR=source +export TOY_REPLDIR=repl +export TOY_OUTDIR=../out +export TOY_OBJDIR=obj + +#targets +all: Toy + +.PHONY: Toy +Toy: + $(MAKE) -C Toy/source -k + +#util targets +$(TOY_OUTDIR): + mkdir $(TOY_OUTDIR) + +$(TOY_OBJDIR): + mkdir $(TOY_OBJDIR) + +#util commands +.PHONY: clean +clean: +ifeq ($(shell uname),Linux) + find . -type f -name '*.o' -delete + find . -type f -name '*.a' -delete + find . -type f -name '*.out' -delete + find . -type f -name '*.exe' -delete + find . -type f -name '*.dll' -delete + find . -type f -name '*.lib' -delete + find . -type f -name '*.so' -delete + find . -type f -name '*.dylib' -delete + find . -type d -name 'out' -delete + find . -type d -name 'obj' -delete +else ifeq ($(shell uname),NetBSD) + find . -type f -name '*.o' -delete + find . -type f -name '*.a' -delete + find . -type f -name '*.out' -delete + find . -type f -name '*.exe' -delete + find . -type f -name '*.dll' -delete + find . -type f -name '*.lib' -delete + find . -type f -name '*.so' -delete + find . -type f -name '*.dylib' -delete + find . -type d -name 'out' -delete + find . -type d -name 'obj' -delete +else ifeq ($(OS),Windows_NT) + $(RM) *.o *.a *.exe *.dll *.lib *.so *.dylib + $(RM) out + $(RM) obj +else ifeq ($(shell uname),Darwin) + find . -type f -name '*.o' -delete + find . -type f -name '*.a' -delete + find . -type f -name '*.out' -delete + find . -type f -name '*.exe' -delete + find . -type f -name '*.dll' -delete + find . -type f -name '*.lib' -delete + find . -type f -name '*.so' -delete + find . -type f -name '*.dylib' -delete + find . -type d -name 'out' -delete + find . -type d -name 'obj' -delete +else + @echo "Deletion failed - what platform is this?" +endif +