diff options
| -rw-r--r-- | LICENSE | 24 | ||||
| -rw-r--r-- | src/Makefile | 18 | ||||
| -rw-r--r-- | src/encryption.c | 2 | ||||
| -rwxr-xr-x | src/main.c | 2 | ||||
| -rw-r--r-- | src/shared.c | 2 | ||||
| -rw-r--r-- | src/tests.c | 2 | ||||
| -rw-r--r-- | src/threadpool.c | 2 |
7 files changed, 20 insertions, 32 deletions
| @@ -1,23 +1,9 @@ | |||
| 1 | MIT No Attribution | 1 | Copyright 2026 @syxhe |
| 2 | 2 | ||
| 3 | Copyright 2024 @syxhe | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| 4 | 4 | ||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
| 6 | software and associated documentation files (the "Software"), to deal in the Software | ||
| 7 | without restriction, including without limitation the rights to use, copy, modify, | ||
| 8 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
| 9 | permit persons to whom the Software is furnished to do so. | ||
| 10 | 6 | ||
| 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
| 12 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
| 13 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| 14 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
| 15 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 17 | 8 | ||
| 18 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file | |
| 19 | |||
| 20 | AGAIN, THE CREATOR OF THE SOFTWARE IS IN NO WAY RESPOSIBLE FOR THE ACTIONS OF THOSE WHOM USE | ||
| 21 | IT, NOR ARE THEY RESPONSIBLE FOR ANY DAMMAGE TO SYSTEMS THAT MAY ARISE FROM THE USE | ||
| 22 | OF THIS SOFTWARE. PERSONS USING THIS SOFTWARE UNDERSTAND THAT, BY RUNNING THIS SOFTWARE, | ||
| 23 | THEY ACCEPT FULL RESPONSIBILITY FOR ANY DAMAGE THEY MAY CAUSE. \ No newline at end of file | ||
diff --git a/src/Makefile b/src/Makefile index 5463c86..f1e4c61 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -2,7 +2,7 @@ CC = gcc | |||
| 2 | SHELL := /usr/bin/env | 2 | SHELL := /usr/bin/env |
| 3 | .SHELLFLAGS := -S bash -c | 3 | .SHELLFLAGS := -S bash -c |
| 4 | 4 | ||
| 5 | CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) | 5 | CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) $$(sdl2-config --cflags) |
| 6 | DEBUG_CFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 | 6 | DEBUG_CFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 |
| 7 | RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto | 7 | RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto |
| 8 | 8 | ||
| @@ -10,7 +10,7 @@ DEFS := -D_GNU_SOURCE=1 | |||
| 10 | DEBUG_DEFS := -DDEBUG=1 | 10 | DEBUG_DEFS := -DDEBUG=1 |
| 11 | RELEASE_DEFS := -DRELEASE=1 | 11 | RELEASE_DEFS := -DRELEASE=1 |
| 12 | 12 | ||
| 13 | LDLIBS := $$(pkg-config --libs-only-l libsodium) | 13 | LDLIBS := $$(pkg-config --libs-only-l libsodium) $$(sdl2-config --libs) |
| 14 | 14 | ||
| 15 | LDFLAGS := $$(pkg-config --libs-only-L libsodium) | 15 | LDFLAGS := $$(pkg-config --libs-only-L libsodium) |
| 16 | RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto | 16 | RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto |
| @@ -19,17 +19,18 @@ SOURCES := $(wildcard *.c) | |||
| 19 | TIMESTAMP_DIR := .timestamps | 19 | TIMESTAMP_DIR := .timestamps |
| 20 | TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES)) | 20 | TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES)) |
| 21 | 21 | ||
| 22 | .PHONY: debug release c clean v val t test test | 22 | .PHONY: deps debug release c clean v val t test |
| 23 | .DELETE_ON_ERROR: | 23 | .DELETE_ON_ERROR: |
| 24 | .ONESHELL: | 24 | .ONESHELL: |
| 25 | 25 | ||
| 26 | # Rule specific var redefs | ||
| 26 | tests debug: CFLAGS += $(DEBUG_CFLAGS) | 27 | tests debug: CFLAGS += $(DEBUG_CFLAGS) |
| 27 | tests debug: DEFS += $(DEBUG_DEFS) | 28 | tests debug: DEFS += $(DEBUG_DEFS) |
| 28 | debug: main | ||
| 29 | |||
| 30 | release: CFLAGS += $(RELEASE_CFLAGS) | 29 | release: CFLAGS += $(RELEASE_CFLAGS) |
| 31 | release: LDFLAGS += $(RELEASE_LDFLAGS) | 30 | release: LDFLAGS += $(RELEASE_LDFLAGS) |
| 32 | release: DEFS += $(RELEASE_DEFS) | 31 | release: DEFS += $(RELEASE_DEFS) |
| 32 | |||
| 33 | debug: main | ||
| 33 | release: main | 34 | release: main |
| 34 | 35 | ||
| 35 | clay.h: | 36 | clay.h: |
| @@ -47,9 +48,7 @@ main: clay.h | |||
| 47 | main tests: %: %.c $(TIMESTAMPS) | 48 | main tests: %: %.c $(TIMESTAMPS) |
| 48 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ | 49 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ |
| 49 | 50 | ||
| 50 | |||
| 51 | # Phony rules | 51 | # Phony rules |
| 52 | |||
| 53 | c clean: | 52 | c clean: |
| 54 | -rm -rvf main tests $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc) | 53 | -rm -rvf main tests $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc) |
| 55 | 54 | ||
| @@ -57,4 +56,7 @@ v val: main | |||
| 57 | valgrind --leak-check=yes ./main | 56 | valgrind --leak-check=yes ./main |
| 58 | 57 | ||
| 59 | t test: tests | 58 | t test: tests |
| 60 | valgrind --leak-check=yes ./tests \ No newline at end of file | 59 | valgrind --leak-check=yes ./tests |
| 60 | |||
| 61 | deps: | ||
| 62 | sudo apt install libsodium-dev libsdl2-dev libsdl2-ttf-dev \ No newline at end of file | ||
diff --git a/src/encryption.c b/src/encryption.c index 6db2c88..a81e6aa 100644 --- a/src/encryption.c +++ b/src/encryption.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * @version 0.1 | 5 | * @version 0.1 |
| 6 | * @date 2025-06-09 | 6 | * @date 2025-06-09 |
| 7 | * | 7 | * |
| 8 | * @copyright Copyright (c) 2025 | 8 | * @copyright Copyright (c) 2026, [Simplified BSD License](../../LICENSE) |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| @@ -5,7 +5,7 @@ | |||
| 5 | * @version 0.1 | 5 | * @version 0.1 |
| 6 | * @date 2025-06-09 | 6 | * @date 2025-06-09 |
| 7 | * | 7 | * |
| 8 | * @copyright Copyright (c) 2025 | 8 | * @copyright Copyright (c) 2026, [Simplified BSD License](../../LICENSE) |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/src/shared.c b/src/shared.c index 5e425f0..4e3fa01 100644 --- a/src/shared.c +++ b/src/shared.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * @version 0.1 | 5 | * @version 0.1 |
| 6 | * @date 2025-06-09 | 6 | * @date 2025-06-09 |
| 7 | * | 7 | * |
| 8 | * @copyright Copyright (c) 2025 | 8 | * @copyright Copyright (c) 2026, [Simplified BSD License](../../LICENSE) |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/src/tests.c b/src/tests.c index 251a580..f155930 100644 --- a/src/tests.c +++ b/src/tests.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * @version 0.1 | 5 | * @version 0.1 |
| 6 | * @date 2025-11-10 | 6 | * @date 2025-11-10 |
| 7 | * | 7 | * |
| 8 | * @copyright Copyright (c) 2025 | 8 | * @copyright Copyright (c) 2026, [Simplified BSD License](../../LICENSE) |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/src/threadpool.c b/src/threadpool.c index 8c6b243..c345aef 100644 --- a/src/threadpool.c +++ b/src/threadpool.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * @version 0.1 | 5 | * @version 0.1 |
| 6 | * @date 2025-06-09 | 6 | * @date 2025-06-09 |
| 7 | * | 7 | * |
| 8 | * @copyright Copyright (c) 2025 | 8 | * @copyright Copyright (c) 2026, [Simplified BSD License](../../LICENSE) |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
