Added 'clean' and 'uninstall' rules to Makefile
This commit is contained in:
16
Makefile
16
Makefile
@@ -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
|
||||
|
Reference in New Issue
Block a user