labs-edaf30/lab2/Makefile
2024-11-20 17:46:21 +01:00

24 lines
458 B
Makefile

CXX = g++
CXXFLAGS = -g3 -Werror -Wall -Wpedantic -Wunused-variable -std=c++17
SRC = $(wildcard *.cc)
OBJ = $(SRC:.cc=.o)
all: spell edit $(OBJ)
edit: test_edit_distance.o edit_distance.o
@echo "Building & linking $@"
@$(CXX) $(CXXFLAGS) $^ -o $@
spell: spell.o word.o dictionary.o
@echo "Building & linking $@"
@$(CXX) $(CXXFLAGS) $^ -o $@
%.o:%.cc
@echo "Building $@"
@$(CXX) -c $(CXXFLAGS) $< -o $@
clean:
rm -f *.o spell edit
.PHONY: clean