lbm2bin
diff Makefile @ 5:03b2aa7ed478
added install/uninstall rules
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 20 Jul 2017 07:35:41 +0300 |
parents | 0b96363742d3 |
children |
line diff
1.1 --- a/Makefile Sun Jul 16 21:30:23 2017 +0300 1.2 +++ b/Makefile Thu Jul 20 07:35:41 2017 +0300 1.3 @@ -1,3 +1,5 @@ 1.4 +PREFIX = /usr/local 1.5 + 1.6 src = $(wildcard src/*.c) 1.7 obj = $(src:.c=.o) 1.8 1.9 @@ -12,3 +14,12 @@ 1.10 .PHONY: clean 1.11 clean: 1.12 rm -f $(obj) $(bin) 1.13 + 1.14 +.PHONY: install 1.15 +install: $(bin) 1.16 + mkdir -p $(DESTDIR)$(PREFIX)/bin 1.17 + cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) 1.18 + 1.19 +.PHONY: uninstall 1.20 +uninstall: 1.21 + rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)