From 1c22d08474fd5a33cd2700058a0f02319f6ede44 Mon Sep 17 00:00:00 2001 From: MichmuseNet Date: Mon, 13 Oct 2025 22:26:34 -0600 Subject: [PATCH] Update Makefile --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 323563f..e7fab1f 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ +MAKEFILE # Define the compiler and compiler flags CXX := g++ CXXFLAGS := -std=c++17 -Wall -g # Define the names for the executable, source files, and object files TARGET := main -SOURCES := person.cpp utils.cpp main.cpp +SOURCES := person.cpp utils.cpp main.cpp stacks/expressions_calculator.cpp OBJECTS := $(SOURCES:.cpp=.o) # Default rule to build the executable @@ -15,17 +16,17 @@ $(TARGET): $(OBJECTS) $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) # Generic rule to compile .cpp files into .o files -# $@ is the target, $< is the first prerequisite %.o: %.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ # Rules for explicit header dependencies -# These rules tell make which object files depend on which header files. -main.o: main.cpp person.h utils.h +main.o: main.cpp person.h utils.h stacks/expressions_calculator.h person.o: person.cpp person.h utils.o: utils.cpp utils.h +stacks/expressions_calculator.o: stacks/expressions_calculator.cpp stacks/expressions_calculator.h # Rule to clean up generated files -.PHONY: clean +.PHONY: cleanls + clean: rm -f $(OBJECTS) $(TARGET)