CC = gcc SHELL = /usr/bin/env -S bash # 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 CFLAGS = -std=c2x -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) OBJECTS := $(patsubst %.c,%.o, $(wildcard *.c)) .PHONY: all c clean val .DELETE_ON_ERROR: all: main main: main.o encryption.o shared.o ll.o arena.o $(OBJECTS): shared.h ll.o: ll.c ll.h main.o: main.c arena.o: arena.c arena.h shared.o: shared.c shared.h # Might as well put shared.h in here explicitly encryption.o: encryption.c encryption.h c clean: -rm -rv main $(OBJECTS) $(wildcard *.test*) $(wildcard *.enc) val: $(MAKE) all valgrind --leak-check=yes ./main