From 76d93bb1cf3a2929c5ecdcdd8b351cf11f5a0abf Mon Sep 17 00:00:00 2001 From: Tijmen van Nesselrooij Date: Sat, 18 Feb 2023 10:33:40 +0100 Subject: [PATCH] Move makefile to root --- test/execute-all.sh => execute-all.sh | 2 +- test/makefile => makefile | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) rename test/execute-all.sh => execute-all.sh (75%) rename test/makefile => makefile (58%) 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