how to make a rule install for makefile code example
Example: how to make a rule install for makefile
PREFIX = /usr/local
.PHONY: install
install: mygame
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp $< $(DESTDIR)$(PREFIX)/bin/mygame
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/mygame