Move makefile to root

This commit is contained in:
2023-02-18 10:33:40 +01:00
parent 3bf5d68074
commit 76d93bb1cf
2 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
programs=$(ls *.out) programs=$(ls test/*.out)
for p in $programs; do for p in $programs; do
echo "Running $p ..." echo "Running $p ..."

View File

@@ -1,19 +1,16 @@
CC = g++ CC = g++
CFLAGS = -std=c++17 -Wall -g CFLAGS = -std=c++17 -Wall -g -Wextra
CPPS = $(wildcard *.cpp) CPPS = $(wildcard test/*.cpp)
EXES = $(patsubst %.cpp, %.out, $(CPPS)) EXES = $(patsubst %.cpp, %.out, $(CPPS))
.PHONY: all clean rebuild check .PHONY: all clean rebuild check
%.out: %.cpp
$(CC) $(CFLAGS) $< -o $@
all: $(EXES) all: $(EXES)
clean: clean:
-rm *.o -rm test/*.o
-rm *.out -rm test/*.out
rebuild: clean all rebuild: clean all
@@ -21,3 +18,6 @@ EXESQUOTED = $(patsubst %, "%", $(EXES))
check: all check: all
./execute-all.sh ./execute-all.sh
%.out: %.cpp
$(CC) $(CFLAGS) $< -o $@