Files
ExprEvalplusplus/Makefile
Arkaprabha Chakraborty faa06b1f87 Remove Deprecated 'run' Target from Makefile and Update 'test' Target
Commit details:
- Removed the deprecated 'run' target from the Makefile, as it was redundant and not needed for the current project structure.
- Minor improvements and cleanup in the Makefile.
2024-01-22 09:32:21 +05:30

26 lines
455 B
Makefile

CXX = clang++
CXXFLAGS = -O3 -std=c++17 -Wall -Wextra -pedantic
BUILD_DIR = build
SRC_DIR = src
SOURCE = ast.cxx
EXECUTABLE = ast
all: $(BUILD_DIR) $(BUILD_DIR)/$(EXECUTABLE)
$(BUILD_DIR):
mkdir -p $@
$(BUILD_DIR)/$(EXECUTABLE): $(SRC_DIR)/$(SOURCE) $(BUILD_DIR)
$(CXX) $(CXXFLAGS) -o $@ $<
.PHONY: test
test: CXXFLAGS += -DENABLE_TESTS
test: $(BUILD_DIR)/$(EXECUTABLE)
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
.PHONY: rebuild
rebuild: clean all