dont work on windows
i dont know why
This commit is contained in:
parent
1a84f77192
commit
49410552c6
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@
|
||||
*.
|
||||
*.txt
|
||||
*.vscode
|
||||
*.out
|
||||
*.out
|
||||
*.exe
|
||||
|
38
makefile
38
makefile
@ -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
|
Loading…
Reference in New Issue
Block a user