Delete Makefile
This commit is contained in:
parent
93ace72fee
commit
000ce49c70
1 changed files with 0 additions and 41 deletions
41
Makefile
41
Makefile
|
|
@ -1,41 +0,0 @@
|
|||
# Makefile for Scientific Calculator
|
||||
|
||||
CXX = g++
|
||||
CXXFLAGS = -std=c++17 -Wall -Wextra -O2
|
||||
TARGET = calculator
|
||||
SRCDIR = src
|
||||
OBJDIR = obj
|
||||
|
||||
# Source files
|
||||
SOURCES = $(wildcard $(SRCDIR)/*.cpp)
|
||||
OBJECTS = $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Create object directory if it doesn't exist
|
||||
$(OBJDIR):
|
||||
mkdir -p $(OBJDIR)
|
||||
|
||||
# Link object files to create executable
|
||||
$(TARGET): $(OBJECTS) | $(OBJDIR)
|
||||
$(CXX) $(OBJECTS) -o $(TARGET) $(LDFLAGS)
|
||||
@echo "Build complete: $(TARGET)"
|
||||
|
||||
# Compile source files to object files
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | $(OBJDIR)
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
rm -rf $(OBJDIR) $(TARGET)
|
||||
@echo "Clean complete"
|
||||
|
||||
# Run the calculator in interactive mode
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
# Phony targets
|
||||
.PHONY: all clean run
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue