file sctructure

This commit is contained in:
bronku 2025-11-15 14:09:33 +01:00
parent 5e8ebb6270
commit e34dc036b0
8 changed files with 13 additions and 601 deletions

View file

@ -1,10 +1,14 @@
CXX = clang++
CFLAGS = -g -lc++ -std=c++17
build/main: main.cpp sort.cpp config.hpp buffer.hpp reader.hpp writer.hpp build
clang $(CFLAGS) main.cpp -o build/main
SRC := $(wildcard src/*.cpp)
TARGET = build/main
$(TARGET): $(SRC) | build
$(CXX) $(CXXFLAGS) $(SRC) -o $(TARGET)
build:
mkdir -p build
mkdir -p build build/run
clean:
rm -rf build
@ -13,15 +17,12 @@ generate: build/run/1.in
# actually should depend on build/main and build/run, but that will trigger it every recompile, and i don't need that
build/run/1.in:
build/main -g -o build/run/1.in
$(TARGET) -g -o build/run/1.in
run: build/main build/run/1.in
build/main -i build/run/1.in -d build/run/tmp
run: $(TARGET) build/run/1.in
$(TARGET) -i build/run/1.in -d build/run/tmp
run_alt: build/main build/run/1.in
build/main -i build/run/1.in -d build/run/tmp -n 11 -b 100
run_alt: $(TARGET) build/run/1.in
$(TARGET) -i build/run/1.in -d build/run/tmp -n 11 -b 100
debug: build/main tests/1.in
lldb -- build/main
.PHONY: clean run debug test generate run_alt
.PHONY: clean run generate run_alt