Rm polarssl compat targets from Makefiles
This commit is contained in:
parent
8fe411e9c1
commit
129db08c90
6 changed files with 6 additions and 82 deletions
6
Makefile
6
Makefile
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
DESTDIR=/usr/local
|
DESTDIR=/usr/local
|
||||||
PREFIX=mbedtls_
|
PREFIX=mbedtls_
|
||||||
OLDPREFIX=polarssl_
|
|
||||||
|
|
||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
|
@ -22,14 +21,13 @@ install:
|
||||||
cp -r include/polarssl $(DESTDIR)/include
|
cp -r include/polarssl $(DESTDIR)/include
|
||||||
|
|
||||||
mkdir -p $(DESTDIR)/lib
|
mkdir -p $(DESTDIR)/lib
|
||||||
cp library/libpolarssl.* library/libmbedtls.* $(DESTDIR)/lib
|
cp 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 ; \
|
ln -sf $$f $(DESTDIR)/bin/$$o ; \
|
||||||
fi \
|
fi \
|
||||||
|
@ -37,14 +35,12 @@ install:
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf $(DESTDIR)/include/polarssl
|
rm -rf $(DESTDIR)/include/polarssl
|
||||||
rm -f $(DESTDIR)/lib/libpolarssl.*
|
|
||||||
rm -f $(DESTDIR)/lib/libmbedtls.*
|
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 ; \
|
rm -f $(DESTDIR)/bin/$$o ; \
|
||||||
fi \
|
fi \
|
||||||
|
|
1
library/.gitignore
vendored
1
library/.gitignore
vendored
|
@ -1,5 +1,4 @@
|
||||||
*.o
|
*.o
|
||||||
libpolarssl.*
|
|
||||||
libmbedtls.*
|
libmbedtls.*
|
||||||
*.sln
|
*.sln
|
||||||
*.vcxproj
|
*.vcxproj
|
||||||
|
|
|
@ -134,24 +134,3 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
DESTINATION ${LIB_INSTALL_DIR}
|
DESTINATION ${LIB_INSTALL_DIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
endif(USE_SHARED_MBEDTLS_LIBRARY)
|
endif(USE_SHARED_MBEDTLS_LIBRARY)
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
add_custom_target(polarssl
|
|
||||||
DEPENDS mbedtls # TODO: and mbedtls_static is shared is defined
|
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/scripts/polarssl_symlinks.sh ${CMAKE_BINARY_DIR}/library
|
|
||||||
)
|
|
||||||
|
|
||||||
if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
|
|
||||||
add_dependencies(polarssl mbedtls_static)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_target(polarssl-clean
|
|
||||||
COMMAND make clean
|
|
||||||
COMMAND rm -f ${CMAKE_BINARY_DIR}/library/libpolarssl.*
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(polarssl-install
|
|
||||||
COMMAND make install
|
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/scripts/polarssl_symlinks.sh ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}
|
|
||||||
)
|
|
||||||
endif(UNIX)
|
|
||||||
|
|
|
@ -80,17 +80,9 @@ else
|
||||||
all: shared static
|
all: shared static
|
||||||
endif
|
endif
|
||||||
|
|
||||||
static: libpolarssl.a
|
static: libmbedtls.a
|
||||||
|
|
||||||
shared: libpolarssl.$(DLEXT)
|
shared: libmbedtls.$(DLEXT)
|
||||||
|
|
||||||
libpolarssl.a: libmbedtls.a
|
|
||||||
echo " LN $@ -> $?"
|
|
||||||
ifndef WINDOWS
|
|
||||||
ln -sf $? $@
|
|
||||||
else
|
|
||||||
copy /y /b $? $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
libmbedtls.a: $(OBJS)
|
libmbedtls.a: $(OBJS)
|
||||||
echo " AR $@"
|
echo " AR $@"
|
||||||
|
@ -98,21 +90,6 @@ libmbedtls.a: $(OBJS)
|
||||||
echo " RL $@"
|
echo " RL $@"
|
||||||
$(AR) s $@
|
$(AR) s $@
|
||||||
|
|
||||||
libpolarssl.$(DLEXT): libmbedtls.$(DLEXT)
|
|
||||||
echo " LN $@ -> $?"
|
|
||||||
ifndef WINDOWS
|
|
||||||
ln -sf $? $@
|
|
||||||
else
|
|
||||||
copy /y /b $? $@
|
|
||||||
endif
|
|
||||||
ifdef WINDOWS_BUILD
|
|
||||||
ifndef WINDOWS
|
|
||||||
ln -sf $?.a $@.a
|
|
||||||
else
|
|
||||||
copy /y /b $?.a $@.a
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
libmbedtls.$(SOEXT): $(OBJS)
|
libmbedtls.$(SOEXT): $(OBJS)
|
||||||
echo " LD $@"
|
echo " LD $@"
|
||||||
$(CC) ${LDFLAGS} -shared -Wl,-soname,$@ -o $@ $(OBJS)
|
$(CC) ${LDFLAGS} -shared -Wl,-soname,$@ -o $@ $(OBJS)
|
||||||
|
@ -135,8 +112,8 @@ libmbedtls.dll: $(OBJS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
ifndef WINDOWS
|
ifndef WINDOWS
|
||||||
rm -f *.o libpolarssl.* libmbedtls.*
|
rm -f *.o libmbedtls.*
|
||||||
endif
|
endif
|
||||||
ifdef WINDOWS
|
ifdef WINDOWS
|
||||||
del /Q /F *.o libpolarssl.* libmbedtls.*
|
del /Q /F *.o libmbedtls.*
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Create libpolarssl.* symlinks in the given directory
|
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
echo "Usage: $0 <target-directory>" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$1" ]; then :; else
|
|
||||||
echo "$0: target directory must exist" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if cd "$1"; then :; else
|
|
||||||
echo "$0: cd '$1' failed" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ls | grep 'libmbedtls\.' >/dev/null; then :; else
|
|
||||||
echo "$0: libmbedtls not found in target directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in libmbedtls.*; do
|
|
||||||
ln -sf $f libpolarssl${f#libmbedtls}
|
|
||||||
done
|
|
|
@ -34,7 +34,7 @@ for my $curve (@curves) {
|
||||||
system( "scripts/config.pl unset $curve" )
|
system( "scripts/config.pl unset $curve" )
|
||||||
and abort "Failed to disable $curve\n";
|
and abort "Failed to disable $curve\n";
|
||||||
|
|
||||||
system( "make polarssl" ) and abort "Failed to build lib: $curve\n";
|
system( "make mbedtls" ) and abort "Failed to build lib: $curve\n";
|
||||||
system( "cd tests && make" ) and abort "Failed to build tests: $curve\n";
|
system( "cd tests && make" ) and abort "Failed to build tests: $curve\n";
|
||||||
system( "make $test" ) and abort "Failed test suite: $curve\n";
|
system( "make $test" ) and abort "Failed test suite: $curve\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue