diff options
author | Richard Levitte <levitte@openssl.org> | 2003-08-08 09:36:46 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-08-08 09:36:46 +0000 |
commit | e5c1a02519d6e3b720e62905cf46114ffc637d23 (patch) | |
tree | afc260738a30b519d5346f472876bd6c19b47776 | |
parent | 782576dbec02ed8953ae897385b356102c2cf055 (diff) |
Some installations (currently, it's been noted on a sco5 system where
gcc is used to build with) don't take it too well if LD_LIBRARY_PATH
is messed with when linknig programs. I'm going to assume that it's
OK to leave it unchanged when linking non-shared.
-rw-r--r-- | apps/Makefile.ssl | 8 | ||||
-rw-r--r-- | test/Makefile.ssl | 192 |
2 files changed, 150 insertions, 50 deletions
diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl index 70124cc406..fcde9253da 100644 --- a/apps/Makefile.ssl +++ b/apps/Makefile.ssl @@ -136,8 +136,12 @@ $(DLIBCRYPTO): $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) $(RM) $(PROGRAM) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) + if [ "$(SHLIB_TARGET)" = "" ] ; then \ + $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \ + fi -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs) progs.h: progs.pl diff --git a/test/Makefile.ssl b/test/Makefile.ssl index ea9d9400d0..2cad915177 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -253,100 +253,196 @@ $(DLIBCRYPTO): (cd ..; $(MAKE) DIRS=crypto all) $(RSATEST): $(RSATEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \ + fi dummytest: dummytest.o $(DLIBCRYPTO) - LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ - $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + if { "$(SHLIB_TARGET)" = "" ]; then \ + $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + else \ + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \ + fi # DO NOT DELETE THIS LINE -- make depend depends on it. |