summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE24
-rw-r--r--src/Makefile18
-rw-r--r--src/encryption.c2
-rwxr-xr-xsrc/main.c2
-rw-r--r--src/shared.c2
-rw-r--r--src/tests.c2
-rw-r--r--src/threadpool.c2
7 files changed, 20 insertions, 32 deletions
diff --git a/LICENSE b/LICENSE
index 774d4f4..84881be 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,23 +1,9 @@
1MIT No Attribution 1Copyright 2026 @syxhe
2 2
3Copyright 2024 @syxhe 3Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 4
5Permission is hereby granted, free of charge, to any person obtaining a copy of this 51. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6software and associated documentation files (the "Software"), to deal in the Software
7without restriction, including without limitation the rights to use, copy, modify,
8merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9permit persons to whom the Software is furnished to do so.
10 6
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 72. 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.
12INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 8
18 9THIS 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
20AGAIN, THE CREATOR OF THE SOFTWARE IS IN NO WAY RESPOSIBLE FOR THE ACTIONS OF THOSE WHOM USE
21IT, NOR ARE THEY RESPONSIBLE FOR ANY DAMMAGE TO SYSTEMS THAT MAY ARISE FROM THE USE
22OF THIS SOFTWARE. PERSONS USING THIS SOFTWARE UNDERSTAND THAT, BY RUNNING THIS SOFTWARE,
23THEY 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
2SHELL := /usr/bin/env 2SHELL := /usr/bin/env
3.SHELLFLAGS := -S bash -c 3.SHELLFLAGS := -S bash -c
4 4
5CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) 5CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) $$(sdl2-config --cflags)
6DEBUG_CFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 6DEBUG_CFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0
7RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto 7RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto
8 8
@@ -10,7 +10,7 @@ DEFS := -D_GNU_SOURCE=1
10DEBUG_DEFS := -DDEBUG=1 10DEBUG_DEFS := -DDEBUG=1
11RELEASE_DEFS := -DRELEASE=1 11RELEASE_DEFS := -DRELEASE=1
12 12
13LDLIBS := $$(pkg-config --libs-only-l libsodium) 13LDLIBS := $$(pkg-config --libs-only-l libsodium) $$(sdl2-config --libs)
14 14
15LDFLAGS := $$(pkg-config --libs-only-L libsodium) 15LDFLAGS := $$(pkg-config --libs-only-L libsodium)
16RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto 16RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto
@@ -19,17 +19,18 @@ SOURCES := $(wildcard *.c)
19TIMESTAMP_DIR := .timestamps 19TIMESTAMP_DIR := .timestamps
20TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES)) 20TIMESTAMPS := $(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
26tests debug: CFLAGS += $(DEBUG_CFLAGS) 27tests debug: CFLAGS += $(DEBUG_CFLAGS)
27tests debug: DEFS += $(DEBUG_DEFS) 28tests debug: DEFS += $(DEBUG_DEFS)
28debug: main
29
30release: CFLAGS += $(RELEASE_CFLAGS) 29release: CFLAGS += $(RELEASE_CFLAGS)
31release: LDFLAGS += $(RELEASE_LDFLAGS) 30release: LDFLAGS += $(RELEASE_LDFLAGS)
32release: DEFS += $(RELEASE_DEFS) 31release: DEFS += $(RELEASE_DEFS)
32
33debug: main
33release: main 34release: main
34 35
35clay.h: 36clay.h:
@@ -47,9 +48,7 @@ main: clay.h
47main tests: %: %.c $(TIMESTAMPS) 48main 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
53c clean: 52c 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
59t test: tests 58t test: tests
60 valgrind --leak-check=yes ./tests \ No newline at end of file 59 valgrind --leak-check=yes ./tests
60
61deps:
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
diff --git a/src/main.c b/src/main.c
index 0b68a44..d0a7573 100755
--- a/src/main.c
+++ b/src/main.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/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