Update name in install target for Make

This commit is contained in:
Manuel Pégourié-Gonnard 2015-01-27 14:05:16 +01:00
parent 6a4ae35788
commit 5285970871

View file

@ -1,6 +1,7 @@
DESTDIR=/usr/local DESTDIR=/usr/local
PREFIX=polarssl_ PREFIX=mbedtls_
OLDPREFIX=polarssl_
.SILENT: .SILENT:
@ -21,26 +22,31 @@ install:
cp -r include/polarssl $(DESTDIR)/include cp -r include/polarssl $(DESTDIR)/include
mkdir -p $(DESTDIR)/lib mkdir -p $(DESTDIR)/lib
cp library/libpolarssl.* $(DESTDIR)/lib cp library/libpolarssl.* library/libmbedtls.* $(DESTDIR)/lib
mkdir -p $(DESTDIR)/bin mkdir -p $(DESTDIR)/bin
for p in programs/*/* ; do \ for p in programs/*/* ; do \
if [ -x $$p ] && [ ! -d $$p ] ; \ if [ -x $$p ] && [ ! -d $$p ] ; \
then \ then \
f=$(PREFIX)`basename $$p` ; \ f=$(PREFIX)`basename $$p` ; \
o=$(OLDPREFIX)`basename $$p` ; \
cp $$p $(DESTDIR)/bin/$$f ; \ cp $$p $(DESTDIR)/bin/$$f ; \
ln -sf $$f $(DESTDIR)/bin/$$o ; \
fi \ fi \
done done
uninstall: uninstall:
rm -rf $(DESTDIR)/include/polarssl rm -rf $(DESTDIR)/include/polarssl
rm -f $(DESTDIR)/lib/libpolarssl.* rm -f $(DESTDIR)/lib/libpolarssl.*
rm -f $(DESTDIR)/lib/libmbedtls.*
for p in programs/*/* ; do \ for p in programs/*/* ; do \
if [ -x $$p ] && [ ! -d $$p ] ; \ if [ -x $$p ] && [ ! -d $$p ] ; \
then \ then \
f=$(PREFIX)`basename $$p` ; \ f=$(PREFIX)`basename $$p` ; \
o=$(OLDPREFIX)`basename $$p` ; \
rm -f $(DESTDIR)/bin/$$f ; \ rm -f $(DESTDIR)/bin/$$f ; \
rm -f $(DESTDIR)/bin/$$o ; \
fi \ fi \
done done