cache_realisation_CPP/makefile

33 lines
447 B
Makefile
Raw Normal View History

2024-09-22 02:25:10 +02:00
TARGET = Q2
CXX = g++
SRCS = main.cpp
TEST = cache_test.cpp
OBJS = $(SRCS:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) -o $@ $^
%.o: %.cpp
2024-09-22 14:23:43 +02:00
$(CXX) $(CPPFLAGS) -c $< -o $@
2024-09-22 02:25:10 +02:00
test:
2024-09-22 14:23:43 +02:00
$(CXX) $(CPPFLAGS) $(TEST) -o cache_test
2024-09-22 02:25:10 +02:00
clean:
rm -f $(OBJS) $(TARGET) cache_test
run: $(TARGET)
./$(TARGET)
ifeq ($(OS), Windows_NT)
clean:
del /Q $(OBJS) $(TARGET) cache_test
run: $(TARGET)
2024-09-22 14:23:43 +02:00
$(TARGET).exe
2024-09-22 02:25:10 +02:00
endif
.PHONY: all clean run test