Added 'clean' and 'uninstall' rules to Makefile

This commit is contained in:
2023-03-25 10:43:11 -05:00
parent aa954570aa
commit a0e4bc6814

View File

@@ -27,14 +27,26 @@ static:
.PHONY: install
ifndef PREFIX
PREFIX := /usr/local
PREFIX := /usr/local
endif
.PHONY: install
install: $(LIB_FILE)
install -d $(DESTDIR)$(PREFIX)/lib
install -m 755 $(LIB_FILE) $(DESTDIR)$(PREFIX)/lib
install -d $(DESTDIR)$(PREFIX)/include
install -m 644 easysock.h $(DESTDIR)$(PREFIX)/include
.PHONY: clean
clean:
rm *.o
rm $(LIB_FILE)
.PHONY: uninstall
uninstall:
rm $(DESTDIR)$(PREFIX)/lib/$(LIB_FILE)
rm $(DESTDIR)$(PREFIX)/include/easysock.h