From 3b5bf3b6ab23c6a5157919490cc07787614f95b8 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 24 Mar 2025 17:59:33 -0500 Subject: Add a warning to ll.h about how dlinkedlist functions are X_ALLOC functions --- src/Makefile | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index c5a08c7..4bddadf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,22 +1,18 @@ CC = gcc -SHELL = /usr/bin/bash +SHELL = /usr/bin/env -S bash -DEBUG_CFLAGS := -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 -RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto -CFLAGS = -Wall -Wextra -Wpedantic -pedantic-errors $(DEBUG_CFLAGS) $$(pkg-config --cflags libsodium) +# I need to get better at makefiles so I can write this in a way that isn't absolutely insane/stupid +# RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto +# RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto -DEBUG_LDLIBS := -RELEASE_LDLIBS := -LDLIBS += $(DEBUG_LDLIBS) $$(pkg-config --libs-only-l libsodium) +CFLAGS = -Wall -Wextra -Wpedantic -pedantic-errors -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 $$(pkg-config --cflags libsodium) +LDLIBS += $$(pkg-config --libs-only-l libsodium) +LDFLAGS += $$(pkg-config --libs-only-L libsodium) -DEBUG_LDFLAGS := -RELEASE_LDFLAGS := -fuse-linker-plugin -flto=auto -LDFLAGS += $(DEBUG_LDFLAGS) $$(pkg-config --libs-only-L libsodium) +BINARIES := main -BINARIES := main encryption - -.PHONY: all clean +.PHONY: all c clean val all: main @@ -27,8 +23,9 @@ main.o: main.c shared.h arena.o: arena.c arena.h shared.h shared.o: shared.c shared.h -encryption: encryption.c encryption.h shared.o shared.h -ll: ll.o shared.o - c clean: - rm -rvf $(BINARIES) $(wildcard *.o) $(wildcard *.test*) $(wildcard *.enc) \ No newline at end of file + rm -rvf $(BINARIES) $(wildcard *.o) $(wildcard *.test*) $(wildcard *.enc) + +val: + $(MAKE) all + valgrind --leak-check=yes ./main \ No newline at end of file -- cgit v1.2.3