Skip to content

Instantly share code, notes, and snippets.

View edcoelho's full-sized avatar
🌺

Edson Coelho edcoelho

🌺
  • Brazil
  • 10:22 (UTC -03:00)
View GitHub Profile
@edcoelho
edcoelho / makefile
Last active May 28, 2025 12:42
The makefile I use for my C++ projects
SRC_DIR := src/
BUILD_DIR := build/
CXXFLAGS := -pedantic-errors -Wall -I$(SRC_DIR)
LDLIBS := -lm
# Default main file.
MAIN := $(addprefix $(SRC_DIR), main.cpp)
# .o file corresponding to the main file.
MAIN_OBJ := $(patsubst %.cpp, %, $(notdir $(MAIN)))