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