2024-09-13 06:02:36 +02:00
|
|
|
|
|
|
|
TARGET = Q2
|
|
|
|
|
|
|
|
CXX = g++
|
|
|
|
|
|
|
|
CXXFLAGS = -Wall -Wextra -std=c++11
|
|
|
|
|
2024-09-15 17:40:48 +02:00
|
|
|
SRCS = main.cpp
|
|
|
|
TEST = cache_test.cpp
|
2024-09-13 06:02:36 +02:00
|
|
|
|
|
|
|
OBJS = $(SRCS:.cpp=.o)
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CXX) -o $@ $^
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
2024-09-15 17:40:48 +02:00
|
|
|
test:
|
2024-09-15 17:47:19 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(TEST) -o cache_test
|
2024-09-15 17:40:48 +02:00
|
|
|
|
|
|
|
|
2024-09-13 06:02:36 +02:00
|
|
|
clean:
|
2024-09-15 17:40:48 +02:00
|
|
|
rm -f $(OBJS) $(TARGET) $(TEST)
|
2024-09-13 06:02:36 +02:00
|
|
|
|
|
|
|
run: $(TARGET)
|
|
|
|
./$(TARGET)
|
|
|
|
|
|
|
|
.PHONY: all clean run
|