From e5fc23163f7178e8ac2c343873971fa731eb06ff Mon Sep 17 00:00:00 2001 From: Maja Andrulewicz <61941student.wsb@gmail.com> Date: Fri, 18 Jan 2019 19:41:40 +0100 Subject: [PATCH 1/4] Makefile_added --- Makefile | 17 +++++++++++++++++ Circle.hpp => includes/Circle.hpp | 0 Rectangle.hpp => includes/Rectangle.hpp | 0 Shape.hpp => includes/Shape.hpp | 0 Square.hpp => includes/Square.hpp | 0 5 files changed, 17 insertions(+) create mode 100644 Makefile rename Circle.hpp => includes/Circle.hpp (100%) rename Rectangle.hpp => includes/Rectangle.hpp (100%) rename Shape.hpp => includes/Shape.hpp (100%) rename Square.hpp => includes/Square.hpp (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ff21a3d --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +CC=g++ +CFLAGS=-Wall -Wextra -Wpedantic -Werror -Iincludes +SOURCES=debug release +OBJECTS=*cpp -std=c++17 + +.PHONY: all +all: $(SOURCES) + +debug: *.cpp includes/*.hpp + $(CC) $(OBJECTS) $(CFLAGS) -g -o debug + +release: *.cpp includes/*.hpp + $(CC) $(OBJECTS) $(CFLAGS) -O3 -o release + +.PHONY: clean +clean: + rm $(SOURCES) diff --git a/Circle.hpp b/includes/Circle.hpp similarity index 100% rename from Circle.hpp rename to includes/Circle.hpp diff --git a/Rectangle.hpp b/includes/Rectangle.hpp similarity index 100% rename from Rectangle.hpp rename to includes/Rectangle.hpp diff --git a/Shape.hpp b/includes/Shape.hpp similarity index 100% rename from Shape.hpp rename to includes/Shape.hpp diff --git a/Square.hpp b/includes/Square.hpp similarity index 100% rename from Square.hpp rename to includes/Square.hpp From 7f5743d7781e27ac883102e8f82611464613dfd0 Mon Sep 17 00:00:00 2001 From: Maja Andrulewicz <61941student.wsb@gmail.com> Date: Fri, 18 Jan 2019 22:33:32 +0100 Subject: [PATCH 2/4] Variable changes --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ff21a3d..283fbd4 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ -CC=g++ -CFLAGS=-Wall -Wextra -Wpedantic -Werror -Iincludes -SOURCES=debug release -OBJECTS=*cpp -std=c++17 +CXX=g++ +CXXFLAGS=-Wall -Wextra -Wpedantic -Werror -Iincludes -std=c++17 +$<=debug release +SOURCES=*cpp .PHONY: all -all: $(SOURCES) +all: $< debug: *.cpp includes/*.hpp - $(CC) $(OBJECTS) $(CFLAGS) -g -o debug + $(CXX) $(SOURCES) $(CXXFLAGS) -g -o $@ release: *.cpp includes/*.hpp - $(CC) $(OBJECTS) $(CFLAGS) -O3 -o release + $(CXX) $(SOURCES) $(CXXFLAGS) -O3 -o $@ .PHONY: clean clean: - rm $(SOURCES) + rm $< From 29366ecf0d9114697766e5b461a4d37a5c65e332 Mon Sep 17 00:00:00 2001 From: Maja Andrulewicz <61941student.wsb@gmail.com> Date: Fri, 18 Jan 2019 23:01:24 +0100 Subject: [PATCH 3/4] Variable changes_2 --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 283fbd4..4147f80 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ CXX=g++ CXXFLAGS=-Wall -Wextra -Wpedantic -Werror -Iincludes -std=c++17 -$<=debug release -SOURCES=*cpp +SOURCES=*cpp. .PHONY: all all: $< From 06e169534ad384d4d79d137c2d67c854ad8c2a0b Mon Sep 17 00:00:00 2001 From: Maja Andrulewicz <61941student.wsb@gmail.com> Date: Sun, 20 Jan 2019 15:44:44 +0100 Subject: [PATCH 4/4] Last changes ? --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4147f80..3797e7b 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ CXX=g++ CXXFLAGS=-Wall -Wextra -Wpedantic -Werror -Iincludes -std=c++17 -SOURCES=*cpp. +SOURCES=*.cpp +INCLUDES=includes/*.hpp .PHONY: all all: $< -debug: *.cpp includes/*.hpp +debug: $(SOURCE) $(INCLUDES) $(CXX) $(SOURCES) $(CXXFLAGS) -g -o $@ -release: *.cpp includes/*.hpp +release: $(SOURCE) $(INCLUDES) $(CXX) $(SOURCES) $(CXXFLAGS) -O3 -o $@ .PHONY: clean