From 190a7a184aae355aaf156dacc0d33373a0b057ca Mon Sep 17 00:00:00 2001 From: DavidDGTNT <29644042+dugo3number2@users.noreply.github.com> Date: Mon, 13 Sep 2021 18:11:32 +0000 Subject: [PATCH] Make build default, make run better, add clean, install, and uninstall (install and uninstall only on linux) --- Makefile | 14 ++++++++++---- Makefile.win | 8 ++++---- Makefile.wps | 8 ++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f27bcce..c9770d3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ -run: - g++ -o calc main.cpp - ./calc - build: g++ -o calc main.cpp + +run: build + ./calc + +install: build + cp calc /usr/local/bin +clean: + rm calc +uninstall: + rm /usr/local/bin/calc \ No newline at end of file diff --git a/Makefile.win b/Makefile.win index fc0e3c4..ffa5069 100644 --- a/Makefile.win +++ b/Makefile.win @@ -1,6 +1,6 @@ -run: - g++ -o calc main.cpp - calc.exe - build: g++ -o calc main.cpp +run: build + calc.exe +clean: + del calc.exe \ No newline at end of file diff --git a/Makefile.wps b/Makefile.wps index 1e4025e..71a5192 100644 --- a/Makefile.wps +++ b/Makefile.wps @@ -1,6 +1,6 @@ -run: - g++ -o calc main.cpp - .\calc.exe - build: g++ -o calc main.cpp +run: build + .\calc.exe +clean: + rm calc.exe \ No newline at end of file