dont work on windows

i dont know why
This commit is contained in:
CiberMonah 2024-09-22 15:23:43 +03:00
parent 1a84f77192
commit 49410552c6
2 changed files with 5 additions and 36 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@
*.
*.txt
*.vscode
*.out
*.out
*.exe

View File

@ -1,9 +1,6 @@
TARGET = Q2
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++11
SRCS = main.cpp
TEST = cache_test.cpp
@ -15,38 +12,10 @@ $(TARGET): $(OBJS)
$(CXX) -o $@ $^
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
$(CXX) $(CPPFLAGS) -c $< -o $@
test:
$(CXX) $(CXXFLAGS) $(TEST) -o cache_test
clean:
rm -f $(OBJS) $(TARGET)
run: $(TARGET)
./$(TARGET)
.PHONY: all clean run
TARGET = Q2
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++11
SRCS = main.cpp
TEST = cache_test.cpp
OBJS = $(SRCS:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) -o $@ $^
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
test:
$(CXX) $(CXXFLAGS) $(TEST) -o cache_test
$(CXX) $(CPPFLAGS) $(TEST) -o cache_test
clean:
rm -f $(OBJS) $(TARGET) cache_test
@ -54,12 +23,11 @@ clean:
run: $(TARGET)
./$(TARGET)
# Windows compatibility for cleaning
ifeq ($(OS), Windows_NT)
clean:
del /Q $(OBJS) $(TARGET) cache_test
run: $(TARGET)
$(TARGET).exe
$(TARGET).exe
endif
.PHONY: all clean run test