libs: cleanup clean/install/uninstall

This commit is contained in:
Xiangfu 2012-10-04 08:44:05 +08:00
parent 293e19d2ea
commit 0766aeaefe

View File

@ -65,7 +65,10 @@ libfpga-control.so: $(LIBFPGA_CONTROL_OBJS)
$(MKDEP) $(MKDEP)
clean: clean:
rm -f $(OBJS) $(OBJS:.o=.d) $(DYNAMIC_LIBS) $(DYNAMIC_LIBS:.so=.so.$(LIBS_VERSION_MAJOR)) rm -f $(OBJS) $(OBJS:.o=.d) $(DYNAMIC_LIBS)
rm -f $(DYNAMIC_LIBS:.so=.a)
rm -f $(DYNAMIC_LIBS:.so=.so.$(LIBS_VERSION_MAJOR))
rm -f $(DYNAMIC_LIBS:.so=.so.$(LIBS_VERSION))
install: all install: all
mkdir -p $(DESTDIR)/$(PREFIX)/include/ mkdir -p $(DESTDIR)/$(PREFIX)/include/
@ -82,7 +85,9 @@ install: all
install -m 644 $$f $(DESTDIR)/$(PREFIX)/lib/$$f \ install -m 644 $$f $(DESTDIR)/$(PREFIX)/lib/$$f \
|| exit 1; done || exit 1; done
uninstall: uninstall:
for f in $(DYNAMIC_HEADS); do rm -f $(DESTDIR)/$(PREFIX)/include/$$f || exit 1; done for f in $(DYNAMIC_HEADS); do rm -f $(DESTDIR)/$(PREFIX)/include/$$f || exit 1; done
for f in $(DYNAMIC_LIBS) $(DYNAMIC_LIBS:.so=.a); do rm -f $(DESTDIR)/$(PREFIX)/lib/$$f* || exit 1; done for f in $(DYNAMIC_LIBS) $(DYNAMIC_LIBS:.so=.a) \
$(DYNAMIC_LIBS:.so=.so.$(LIBS_VERSION_MAJOR)) \
$(DYNAMIC_LIBS:.so=.so.$(LIBS_VERSION)); do \
rm -f $(DESTDIR)/$(PREFIX)/lib/$$f || exit 1; done