From 33647dd2c4f4af7c7cb7d99c1a6dac7f1d059a67 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 20 Oct 2025 15:51:49 -0500 Subject: Switch to unity build --- src/Makefile | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 0ee5897..9293e55 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,35 +6,24 @@ SHELL := /usr/bin/env # 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 -DEPFLAGS = -MT $@ -MMD -MP -MF $*.d +CFLAGS = -std=c2x -Wall -Wextra -Wpedantic -pedantic-errors -fanalyzer -Wanalyzer-too-complex -ggdb -g3 -O0 CFLAGS += $$(pkg-config --cflags libsodium) LDLIBS += $$(pkg-config --libs-only-l libsodium) LDFLAGS += $$(pkg-config --libs-only-L libsodium) SOURCES := $(wildcard *.c) -OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) -DEPS := $(patsubst %.c,%.d,$(SOURCES)) - -COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) -c .PHONY: all c clean val .DELETE_ON_ERROR: .ONESHELL: all: main -main: $(OBJECTS) - -%.o: %.c %.d - $(COMPILE.c) $< - -$(DEPS): -include $(wildcard $(DEPS)) -# Adopted from https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ +main: + echo "Need to update makefile to work with unity build" c clean: - @-rm -rv main $(OBJECTS) $(DEPS) $(wildcard *.test*) $(wildcard *.enc) + @-rm -rv main $(wildcard *.test*) $(wildcard *.enc) val: $(MAKE) all -- cgit v1.2.3