Makefile: add install/uninstall rules
This commit is contained in:
parent
24876ab431
commit
c709333aa1
11
Makefile
11
Makefile
|
@ -6,7 +6,9 @@
|
||||||
# For details see the UNLICENSE file at the root of the source tree.
|
# For details see the UNLICENSE file at the root of the source tree.
|
||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: all clean
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
|
.PHONY: all clean install uninstall
|
||||||
.SECONDARY:
|
.SECONDARY:
|
||||||
CFLAGS += -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations \
|
CFLAGS += -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations \
|
||||||
-Wno-format-zero-length -Ofast
|
-Wno-format-zero-length -Ofast
|
||||||
|
@ -119,3 +121,10 @@ clean:
|
||||||
compare_ports_matching.txt compare_ports_diff.txt compare_ports_extra.txt \
|
compare_ports_matching.txt compare_ports_diff.txt compare_ports_extra.txt \
|
||||||
compare_sw_matching.txt compare_sw_diff.txt compare_sw_extra.txt \
|
compare_sw_matching.txt compare_sw_diff.txt compare_sw_extra.txt \
|
||||||
compare_nets_matching.txt compare_nets_diff.txt compare_nets_extra.txt
|
compare_nets_matching.txt compare_nets_diff.txt compare_nets_extra.txt
|
||||||
|
|
||||||
|
install: all
|
||||||
|
mkdir -p $(DESTDIR)/$(PREFIX)/bin/
|
||||||
|
install -m 755 new_fp $(DESTDIR)/$(PREFIX)/bin/
|
||||||
|
install -m 755 bit2txt $(DESTDIR)/$(PREFIX)/bin/
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)/$(PREFIX)/bin/{new_fp,bit2txt}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user