diff --git a/test/execute-all.sh b/execute-all.sh similarity index 75% rename from test/execute-all.sh rename to execute-all.sh index af4dc46..8345885 100755 --- a/test/execute-all.sh +++ b/execute-all.sh @@ -1,6 +1,6 @@ #!/bin/bash -programs=$(ls *.out) +programs=$(ls test/*.out) for p in $programs; do echo "Running $p ..." diff --git a/test/makefile b/makefile similarity index 58% rename from test/makefile rename to makefile index 2c039b9..f64cfcc 100644 --- a/test/makefile +++ b/makefile @@ -1,23 +1,23 @@ 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)) .PHONY: all clean rebuild check -%.out: %.cpp - $(CC) $(CFLAGS) $< -o $@ - all: $(EXES) clean: - -rm *.o - -rm *.out + -rm test/*.o + -rm test/*.out rebuild: clean all EXESQUOTED = $(patsubst %, "%", $(EXES)) check: all - ./execute-all.sh \ No newline at end of file + ./execute-all.sh + +%.out: %.cpp + $(CC) $(CFLAGS) $< -o $@ \ No newline at end of file