diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5fe94be --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +.PHONY: configure build clean test install + +# Build directory +BUILD_DIR := build + +# Default target +.DEFAULT_GOAL := help + + +# Help target +help: + @echo "Available targets:" + @echo " make configure - Configure the project with CMake" + @echo " make build - Build the project" + @echo " make clean - Clean build artifacts" + @echo " make test - Run tests" + @echo " make install - Install the library" + +# Configure: Run CMake configuration +configure: + @mkdir -p $(BUILD_DIR) + cd $(BUILD_DIR) && cmake .. + +# Build: Compile the project +build: + cd $(BUILD_DIR) && cmake --build . + +# Clean: Remove build directory and artifacts +clean: + rm -rf $(BUILD_DIR) + +# Test: Run the test suite +test: build + cd $(BUILD_DIR) && ctest --output-on-failure -V + +# Install: Install the library +install: build + cd $(BUILD_DIR) && cmake --install . +