makefile based build

This commit is contained in:
2026-03-28 08:55:31 -04:00
parent 244dc0afa6
commit 52114dae41
5 changed files with 845 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# Compiler
CXX := g++
# Common settings
STD := -std=c++14
TARGET := floating_demo
SRC := main.cpp
# Debug flags
CXXFLAGS_DEBUG := $(STD) -O0 -Wall -Wextra -pedantic
# Release flags
CXXFLAGS_RELEASE := $(STD) -O2
# Default target
all: debug
# Debug build
debug:
$(CXX) $(CXXFLAGS_DEBUG) $(SRC) -o $(TARGET)
# Release build
release:
$(CXX) $(CXXFLAGS_RELEASE) $(SRC) -o $(TARGET)
# Clean
clean:
rm -f $(TARGET)
# Phony targets
.PHONY: all debug release clean