This commit is contained in:
Imbus 2024-11-20 17:46:21 +01:00
parent e4e27d421a
commit 7d93d5dbfa
8 changed files with 224 additions and 53 deletions

24
lab2/Makefile Normal file
View file

@ -0,0 +1,24 @@
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