Added 'clean' and 'uninstall' rules to Makefile

Aadhavan Srinivasan 2 years ago
parent aa954570aa
commit a0e4bc6814

@ -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

Loading…
Cancel
Save