CC=gcc #Base Directories SRCDIR=src BINDIR=bin INCDIR=include #Common flags CFLAGS=-I$(INCDIR) -O2 -march=native -flto #-ffast-math #tolutils TOL_SRCS = $(wildcard $(SRCDIR)/*.c) TOL_EXES = $(patsubst $(SRCDIR)/%.c, $(BINDIR)/%.exe, $(TOL_SRCS)) # Setup target setup: mkdir -p $(BINDIR) $(INCDIR) all: setup tolsac structure tolsac: $(TOL_EXES) $(BINDIR)/%.exe: $(SRCDIR)/%.c $(CC) $< $(CFLAGS) -o $@ clean: rm -f $(BINDIR)/* rm -f structure.txt rebuild: clean all # Generate project structure structure: @powershell -Command "(Get-Item .).Name | Set-Content structure.txt; (tree /a /f | Select-Object -Skip 3) | Add-Content structure.txt"