
CC = mold -run clang-21
CFLAGS = -fbasic-block-address-map -funique-internal-linkage-names -flto -W -Wall -ffast-math -fforce-addr -funroll-loops -fPIE -pie -O4 -msse4a
SRC = ./src/*.c
PREFIX = /usr/local
BIN = ./bin/


all: $(SRC)
	$(CC) $(SRC) -o $(BIN)wavfix $(CFLAGS)

.PHONY: install
install: wavfix
	mkdir -p $(PREFIX)/bin
	cp $< $(PREFIX)/bin/wavfix

.PHONY: uninstall
uninstall:
	rm -f $(PREFIX)/bin/wavfix
