diff options
author | nectar <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
commit | 0aed2eea83b351d68092e43b5a9496ce3dd5043d (patch) | |
tree | a6133c35ab337984fbbd26293f8b1ad7a958132b /crypto/openssl/Makefile.org | |
parent | 1f8c2aa1763b5d8a328b2fd4053396e94ea48d35 (diff) | |
download | FreeBSD-src-0aed2eea83b351d68092e43b5a9496ce3dd5043d.zip FreeBSD-src-0aed2eea83b351d68092e43b5a9496ce3dd5043d.tar.gz |
Import of OpenSSL 0.9.6d.
Diffstat (limited to 'crypto/openssl/Makefile.org')
-rw-r--r-- | crypto/openssl/Makefile.org | 108 |
1 files changed, 85 insertions, 23 deletions
diff --git a/crypto/openssl/Makefile.org b/crypto/openssl/Makefile.org index f958417..e47d8b4 100644 --- a/crypto/openssl/Makefile.org +++ b/crypto/openssl/Makefile.org @@ -183,6 +183,7 @@ SHARED_CRYPTO=libcrypto$(SHLIB_EXT) SHARED_SSL=libssl$(SHLIB_EXT) SHARED_LIBS= SHARED_LIBS_LINK_EXTS= +SHARED_LDFLAGS= GENERAL= Makefile BASENAME= openssl @@ -235,19 +236,22 @@ clean-shared: done; \ fi; \ ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \ + if [ "$(PLATFORM)" = "Cygwin" ]; then \ + ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \ + fi; \ done link-shared: - @for i in $(SHLIBDIRS); do \ - prev=lib$$i$(SHLIB_EXT); \ - if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ - tmp="$(SHARED_LIBS_LINK_EXTS)"; \ + @if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ + tmp="$(SHARED_LIBS_LINK_EXTS)"; \ + for i in $(SHLIBDIRS); do \ + prev=lib$$i$(SHLIB_EXT); \ for j in $${tmp:-x}; do \ ( set -x; ln -f -s $$prev lib$$i$$j ); \ prev=lib$$i$$j; \ done; \ - fi; \ - done + done; \ + fi build-shared: clean-shared do_$(SHLIB_TARGET) link-shared @@ -255,8 +259,10 @@ do_bsd-gcc-shared: do_gnu-shared do_linux-shared: do_gnu-shared do_gnu-shared: libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-Bsymbolic \ -Wl,--whole-archive lib$$i.a \ -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="$$libs -l$$i"; \ @@ -269,13 +275,35 @@ DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \ [ -n "$$my_ld" ] && \ $$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1 +# For Darwin AKA Mac OS/X (dyld) +do_darwin-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \ + lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \ + -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ + libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \ + echo "" ; \ + done + +do_cygwin-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x; ${CC} -shared -o cyg$$i.dll \ + -Wl,-Bsymbolic \ + -Wl,--whole-archive lib$$i.a \ + -Wl,--out-implib,lib$$i.dll.a \ + -Wl,--no-whole-archive $$libs ) || exit 1; \ + libs="$$libs -l$$i"; \ + done + # This assumes that GNU utilities are *not* used do_alpha-osf1-shared: if ${DETECT_GNU_LD}; then \ $(MAKE) do_gnu-shared; \ else \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; ${CC} -shared -o lib$$i.so \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so \ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="$$libs -l$$i"; \ @@ -290,7 +318,8 @@ do_tru64-shared: $(MAKE) do_gnu-shared; \ else \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; ${CC} -shared -msym -o lib$$i.so \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -msym -o lib$$i.so \ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="$$libs -l$$i"; \ @@ -305,7 +334,8 @@ do_tru64-shared-rpath: $(MAKE) do_gnu-shared; \ else \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; ${CC} -shared -msym -o lib$$i.so \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -msym -o lib$$i.so \ -rpath ${INSTALLTOP}/lib \ -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ @@ -321,13 +351,33 @@ do_solaris-shared: else \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ - set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + set -x; ${CC} ${SHARED_LDFLAGS} \ + -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="$$libs -l$$i"; \ done; \ fi +# OpenServer 5 native compilers used +do_svr3-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ + find . -name "*.o" -print > allobjs ; \ + OBJS= ; export OBJS ; \ + for obj in `ar t lib$$i.a` ; do \ + OBJS="$${OBJS} `grep $$obj allobjs`" ; \ + done ; \ + set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \ + libs="$$libs -l$$i"; \ + done; \ + fi + # UnixWare 7 and OpenUNIX 8 native compilers used do_svr5-shared: if ${DETECT_GNU_LD}; then \ @@ -340,7 +390,8 @@ do_svr5-shared: for obj in `ar t lib$$i.a` ; do \ OBJS="$${OBJS} `grep $$obj allobjs`" ; \ done ; \ - set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + set -x; ${CC} ${SHARED_LDFLAGS} \ + -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \ libs="$$libs -l$$i"; \ @@ -353,7 +404,8 @@ do_irix-shared: $(MAKE) do_gnu-shared; \ else \ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \ libs="$$libs -l$$i"; \ @@ -362,8 +414,9 @@ do_irix-shared: # This assumes that GNU utilities are *not* used do_hpux-shared: - libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; /usr/ccs/bin/ld +vnocompatwarnings \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ + +vnocompatwarnings \ -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \ @@ -372,8 +425,9 @@ do_hpux-shared: # This assumes that GNU utilities are *not* used do_hpux64-shared: - libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - ( set -x; /usr/ccs/bin/ld -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ + -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ +forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="$$libs -L. -l$$i"; \ @@ -409,7 +463,7 @@ do_hpux64-shared: # HP/UX-64bit: /usr/ccs/bin/ld # AIX: $(CC) ALLSYMSFLAG=-bnogc -SHAREDFLAGS=-G -bE:lib$$i.exp -bM:SRE +SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE SHAREDCMD=$(CC) do_aix-shared: libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ @@ -592,17 +646,25 @@ install: all install_docs cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ - fi \ + fi; \ done @if [ -n "$(SHARED_LIBS)" ]; then \ tmp="$(SHARED_LIBS)"; \ for i in $${tmp:-x}; \ do \ - if [ -f "$$i" ]; then \ + if [ -f "$$i" -o -f "$$i.a" ]; then \ ( echo installing $$i; \ - cp -f $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ - fi \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ + else \ + c=`echo $$i | sed 's/^lib/cyg/'`; \ + cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ + cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + fi ); \ + fi; \ done; \ ( here="`pwd`"; \ cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ |