add uninstall make-target

[skip ci]
This commit is contained in:
Steffen Jaeckel 2017-08-28 15:56:30 +02:00
parent 237b49ad4a
commit a29e9fa7c4
2 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,10 @@ install: $(LIBNAME)
install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
uninstall:
rm $(DESTDIR)$(LIBPATH)/$(LIBNAME)
rm $(HEADERS_PUB:%=$(DESTDIR)$(INCPATH)/%)
test: $(LIBNAME) demo/demo.o
$(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test

View File

@ -61,6 +61,11 @@ install: $(LIBNAME)
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
install -m 644 libtommath.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
uninstall:
$(LT) --mode=uninstall rm $(DESTDIR)$(LIBPATH)/$(LIBNAME)
rm $(HEADERS_PUB:%=$(DESTDIR)$(INCPATH)/%)
rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtommath.pc
test: $(LIBNAME) demo/demo.o
$(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
$(LT) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)