add 'uninstall' make target

This commit is contained in:
Steffen Jaeckel 2016-04-24 18:37:17 +02:00
parent a5e8652fb1
commit 6ae4762482
2 changed files with 10 additions and 0 deletions

View File

@ -103,6 +103,11 @@ install: $(LIBNAME)
install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
install -g $(GROUP) -o $(USER) $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
HEADER_FILES=$(notdir $(HEADERS_PUB))
uninstall:
rm $(DESTDIR)$(LIBPATH)/$(LIBNAME)
rm $(HEADER_FILES:%=$(DESTDIR)$(INCPATH)/%)
.PHONY: mtest
mtest: $(LIBNAME)
cd mtest; CC="$(CC)" CFLAGS="$(CFLAGS) -I../" MAKE=${MAKE} ${MAKE} mtest

View File

@ -97,6 +97,11 @@ install: $(LIBNAME)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
install -g $(GROUP) -o $(USER) $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
HEADER_FILES=$(notdir $(HEADERS_PUB))
uninstall:
libtool --mode=uninstall rm $(DESTDIR)$(LIBPATH)/$(LIBNAME)
rm $(HEADER_FILES:%=$(DESTDIR)$(INCPATH)/%)
mtest/mtest: mtest/mtest.c
cd mtest ; make mtest