blob: d1927685fc6523a5abdfc969c17db4d29190c8ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"
|