From: Lutz Jänicke Date: Tue, 29 Jan 2002 16:32:40 +0000 (+0000) Subject: HP-UX 32bit: X-Git-Tag: OpenSSL_0_9_7-beta1~269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f701551f360bde6b42cc4a8a963db016a5fc9b98;p=openssl HP-UX 32bit: * When linking against shared libraries, the absolute path is remembered. - When linking against -L.., '..' is remembered inside the executable, so it will fail after "make install" or when not called from inside the "apps/" subdirectory of the build tree. - When using the "+cdp" option of "ld", the ".." information can be exchanged against $(INSTALL_TOP)/lib. In this case the executable will however refuse to work before "make install" has been called. This makes testing the 'openssl' executable a problem. * Solution 1: Relink the "openssl" executable, when "make install" is called. This would however require significant changes to the toplevel Makefile and the apps/ Makefile. * Solution 2: Statically link against libssl and libcrypto, so that the "openssl" executable is no longer dependant on the openssl shared libraries. Select option 2 for HP-UX 32bit, as this requires the smallest change. --- diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl index 53bea9f87a..eb0f830700 100644 --- a/apps/Makefile.ssl +++ b/apps/Makefile.ssl @@ -24,6 +24,8 @@ PEX_LIBS= EX_LIBS= EXE_EXT= +SHLIB_TARGET= + CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG) GENERAL=Makefile makeapps.com install.com @@ -139,7 +141,11 @@ $(DLIBCRYPTO): $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) $(RM) $(PROGRAM) - $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) + if [ "$(SHLIB_TARGET)" = "hpux-shared" ] ; then \ + $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ + else \ + $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + fi -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \ LIBPATH="`pwd`"; LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; \ export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \