Something went wrong. Try again.
Practicing my algorithms chops by implementing the STL algorithms library in C.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536
.POSIX:
.PHONY: run build
SRC = ./src/main.c ./src/mystl.cCC = clangCFLAGS = -Wconversion -Wall -Wswitch-enum -Wextra -pedantic --std=c11DEBUG = ./build/debug/debugRELEASE = ./build/release/release
all: options build
options: @echo mystl build options: @echo "CC = $(CC)" @echo "CFLAGS = $(CFLAGS)"
run: build $(DEBUG)
build: $(CC) $(CFLAGS) -Os $(SRC) -o $(DEBUG)
debug: check $(CC) $(CFLAGS) -Og -ggdb $(SRC) -o $(DEBUG)
release: $(CC) $(CFLAGS) -O3 $(SRC) -o $(RELEASE)
format: clang-format -i $(SRC) --style="{BasedOnStyle: GNU, ColumnLimit: 100}"
check: clang-tidy -extra-arg=-std=c11 $(SRC)