From 0a64ff62830495ea21bdafe33b6166c3955d35fd Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 25 Apr 2025 21:13:44 +0200 Subject: First Commit --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d192768 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +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" -- cgit v1.2.3