summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2013-10-21 07:07:35 +0000
committerLiong Sauw Ming <ming@teluu.com>2013-10-21 07:07:35 +0000
commit7b4f6389ccc9d6846fc4ca528108eaff342b3292 (patch)
treec8fe41018daf04d28ec122add6b19725f33d6a85
parente73fa43ddc218df61819408dddc46752655257b2 (diff)
Re #1630 (misc): Thanks to Mark Michelson for the patch.
This creates an "uninstall" target in the project Makefile that will remove the installed libraries from the system. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4627 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e33472fc..837477e0 100644
--- a/Makefile
+++ b/Makefile
@@ -119,3 +119,15 @@ install:
sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \
sed -e "s!@PJ_LDLIBS@!$(PJ_LDLIBS)!" | \
sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(prefix)/lib/pkgconfig/libpjproject.pc
+
+uninstall:
+ $(RM) $(DESTDIR)$(libdir)/pkgconfig/libpjproject.pc
+ -rmdir $(DESTDIR)$(libdir)/pkgconfig 2> /dev/null
+ for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
+ for f in $$d/include/*; do \
+ $(RM) -r "$(DESTDIR)$(includedir)/`basename $$f`"; \
+ done; \
+ done
+ -rmdir $(DESTDIR)$(includedir) 2> /dev/null
+ $(RM) $(addprefix $(DESTDIR)$(libdir)/,$(notdir $(APP_LIB_FILES)))
+ -rmdir $(DESTDIR)$(libdir) 2> /dev/null