From 7253af98ec1a0f4f2ba26b2ac129ad085cd34592 Mon Sep 17 00:00:00 2001 From: alecs Date: Fri, 14 May 2021 20:13:39 +0200 Subject: [PATCH] Added support to install and uninstall figa --- Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a9d13ac..49aff48 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,22 @@ +PREFIX ?= /usr FILE = figa all: - as -o $(FILE).o $(FILE).s - ld -o $(FILE) $(FILE).o + @as -o $(FILE).o $(FILE).s + @ld -o $(FILE) $(FILE).o clean: - rm $(FILE).o - rm $(FILE) + @rm $(FILE).o + @rm $(FILE) + +install: + @mkdir -p $(DESTDIR)$(PREFIX)/bin + @cp -p figa $(DESTDIR)$(PREFIX)/bin/figa + +uninstall: + @rm $(DESTDIR)$(PREFIX)/bin/figa debug: - as -g -o $(FILE).o $(FILE).s - ld -o $(FILE) $(FILE).o + @as -g -o $(FILE).o $(FILE).s + @ld -o $(FILE) $(FILE).o