init: initial commit

This commit is contained in:
2024-11-21 22:22:14 +01:00
commit b5868dfdec
8 changed files with 467 additions and 0 deletions

30
Makefile Normal file
View File

@@ -0,0 +1,30 @@
SHELL = /bin/bash
SRC_DIR = ./src
INC_DIR = ./include
OBJ_DIR = ./obj
HEADERS = $(wildcard $(INC_DIR)/*.hpp)
SRC_FILES = $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES = $(addprefix $(OBJ_DIR)/,$(notdir $(SRC_FILES:.cpp=.o)))
CXXFLAGS += -Wall -std=c++20 -O2
all: bin/swarm
$(OBJ_DIR)/%.o: src/%.cpp
$(CXX) -I $(INC_DIR) $(CXXFLAGS) -c -o $@ $^
bin/swarm: $(OBJ_FILES)
@mkdir -p $(OBJ_DIR)
@mkdir -p bin
$(CXX) -I $(INC_DIR) $(CXXFLAGS) -o $@ $^
.PHONY: debug
debug: CXXFLAGS += -O0 -g
debug: clean bin/swarm
.PHONY: clean
clean:
$(RM) obj/*.o
$(RM) bin/swarm