From c4b9503b3e3331c09712810910d2b36f52d98ada Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Wed, 14 Jan 2026 16:17:47 -0600 Subject: Change to the Simplified BSD License --- src/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 5463c86..f1e4c61 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ CC = gcc SHELL := /usr/bin/env .SHELLFLAGS := -S bash -c -CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) +CFLAGS := -std=c2x $$(pkg-config --cflags libsodium) $$(sdl2-config --cflags) DEBUG_CFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto @@ -10,7 +10,7 @@ DEFS := -D_GNU_SOURCE=1 DEBUG_DEFS := -DDEBUG=1 RELEASE_DEFS := -DRELEASE=1 -LDLIBS := $$(pkg-config --libs-only-l libsodium) +LDLIBS := $$(pkg-config --libs-only-l libsodium) $$(sdl2-config --libs) LDFLAGS := $$(pkg-config --libs-only-L libsodium) RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto @@ -19,17 +19,18 @@ SOURCES := $(wildcard *.c) TIMESTAMP_DIR := .timestamps TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES)) -.PHONY: debug release c clean v val t test test +.PHONY: deps debug release c clean v val t test .DELETE_ON_ERROR: .ONESHELL: +# Rule specific var redefs tests debug: CFLAGS += $(DEBUG_CFLAGS) tests debug: DEFS += $(DEBUG_DEFS) -debug: main - release: CFLAGS += $(RELEASE_CFLAGS) release: LDFLAGS += $(RELEASE_LDFLAGS) release: DEFS += $(RELEASE_DEFS) + +debug: main release: main clay.h: @@ -47,9 +48,7 @@ main: clay.h main tests: %: %.c $(TIMESTAMPS) $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ - # Phony rules - c clean: -rm -rvf main tests $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc) @@ -57,4 +56,7 @@ v val: main valgrind --leak-check=yes ./main t test: tests - valgrind --leak-check=yes ./tests \ No newline at end of file + valgrind --leak-check=yes ./tests + +deps: + sudo apt install libsodium-dev libsdl2-dev libsdl2-ttf-dev \ No newline at end of file -- cgit v1.2.3