From 787d49c0dbf3f0709e57cbc347e5ed739449f242 Mon Sep 17 00:00:00 2001 From: Nemo D'ACREMONT Date: Fri, 14 Mar 2025 17:05:53 +0100 Subject: [PATCH] batman --- .gitignore | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 22 ++++++++++++++++++ Makefile | 31 ++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 119 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eb8c04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,65 @@ +/build +/controller +/tags +/.vscode +/compile_flags.txt + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# 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 + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9fcbaee --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2025 Le monde de Nemo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a71eae1 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +build_dir?=build +src_dir?=src + +src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/))) +includes=$(patsubst %,-I%,${src_dirs}) +CFLAGS+=-g -O0 -std=c99 ${includes} +LDFLAGS+= + +srcs+=$(wildcard ${src_dir}/*.c ${src_dir}/**/*.c) +objs+=$(patsubst ${src_dir}/%.c,${build_dir}/%.o,${srcs}) + +.PHONY: all +all: build + +.PHONY: build +build: controller + +controller: ${objs} + ${CC} -o $@ $^ ${CFLAGS} ${LDFLAGS} + +${build_dir}/%.o: ${src_dir}/%.c + @mkdir -p $(dir $@) + ${CC} -c -o $@ $^ ${CFLAGS} + +.PHONY: compile_flags.txt +compile_flags.txt: + (echo "${CFLAGS} ${LDFLAGS}" | sed 's/ /\n/g') > compile_flags.txt + +.PHONY: clean +clean: + ${RM} -rf build controller diff --git a/README.md b/README.md new file mode 100644 index 0000000..e601e59 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +salut