Enhance and clear the support of linker flags
Some time ago, we had a ex_libs configuration setting that could be divided into lflags and ex_libs. These got divided in two settings, lflags and ex_libs, and the former was interpreted to be general linking flags. Unfortunately, that conclusion wasn't entirely accurate. Most of those linking were meant to end up in a very precise position on the linking command line, just before the spec of libraries the linking depends on. Back to the drawing board, we're diving things further, now having lflags, which are linking flags that aren't depending on command line position, plib_lflags, which are linking flags that should show up just before the spec of libraries to depend on, and finally ex_libs, which is the spec of extra libraries to depend on. Also, documentation is changed in Configurations/README. This was previously forgotten. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
This commit is contained in:
parent
b438f0ed8f
commit
c86ddbe613
@ -1345,7 +1345,7 @@
|
|||||||
release_cflags => "-O3",
|
release_cflags => "-O3",
|
||||||
thread_cflag => "-D_REENTRANT",
|
thread_cflag => "-D_REENTRANT",
|
||||||
sys_id => "MACOSX",
|
sys_id => "MACOSX",
|
||||||
lflags => "-Wl,-search_paths_first",
|
plib_lflags => "-Wl,-search_paths_first",
|
||||||
bn_ops => "BN_LLONG RC4_CHAR",
|
bn_ops => "BN_LLONG RC4_CHAR",
|
||||||
perlasm_scheme => "osx32",
|
perlasm_scheme => "osx32",
|
||||||
dso_scheme => "dlfcn",
|
dso_scheme => "dlfcn",
|
||||||
@ -1498,7 +1498,7 @@
|
|||||||
cc => "$ENV{'CC'}",
|
cc => "$ENV{'CC'}",
|
||||||
cflags => "\$(CFLAGS)",
|
cflags => "\$(CFLAGS)",
|
||||||
thread_cflag => "-D_REENTRANT",
|
thread_cflag => "-D_REENTRANT",
|
||||||
lflags => "\$(LDFLAGS)",
|
plib_lflags => "\$(LDFLAGS)",
|
||||||
ex_libs => "\$(LDLIBS)",
|
ex_libs => "\$(LDLIBS)",
|
||||||
bn_ops => "BN_LLONG",
|
bn_ops => "BN_LLONG",
|
||||||
dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
|
dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
|
||||||
@ -1512,7 +1512,7 @@
|
|||||||
cc => "$ENV{'CC'}",
|
cc => "$ENV{'CC'}",
|
||||||
cflags => "\$(CFLAGS)",
|
cflags => "\$(CFLAGS)",
|
||||||
thread_cflag => "-D_REENTRANT",
|
thread_cflag => "-D_REENTRANT",
|
||||||
lflags => "\$(LDFLAGS)",
|
plib_lflags => "\$(LDFLAGS)",
|
||||||
ex_libs => "\$(LDLIBS)",
|
ex_libs => "\$(LDLIBS)",
|
||||||
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
||||||
dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
|
dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
cflags => "$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall",
|
cflags => "$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall",
|
||||||
thread_cflag => "-D_REENTRANT",
|
thread_cflag => "-D_REENTRANT",
|
||||||
sys_id => "MACOSX",
|
sys_id => "MACOSX",
|
||||||
lflags => "-Wl,-search_paths_first",
|
plib_lflags => "-Wl,-search_paths_first",
|
||||||
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
||||||
perlasm_scheme => "macosx",
|
perlasm_scheme => "macosx",
|
||||||
dso_scheme => "dlfcn",
|
dso_scheme => "dlfcn",
|
||||||
|
@ -39,25 +39,22 @@ In each table entry, the following keys are significant:
|
|||||||
compiling for shared libraries, typically
|
compiling for shared libraries, typically
|
||||||
something like "-fPIC".
|
something like "-fPIC".
|
||||||
|
|
||||||
ld => the linker command, usually not defined
|
(linking is a complex thing, see [3] below)
|
||||||
|
ld => Linker command, usually not defined
|
||||||
(meaning the compiler command is used
|
(meaning the compiler command is used
|
||||||
instead).
|
instead).
|
||||||
(NOTE: this is here for future use, it's
|
(NOTE: this is here for future use, it's
|
||||||
not implemented yet)
|
not implemented yet)
|
||||||
lflags => the flags that are used at all times when
|
lflags => Flags that are used when linking apps.
|
||||||
linking. These can have a % sign in them
|
shared_ldflag => Flags that are used when linking shared
|
||||||
showing where the OpenSSL libraries should
|
or dynamic libraries.
|
||||||
appear, otherwise these flags will come
|
plib_lflags => Extra linking flags to appear just before
|
||||||
last. So in a typical links situation,
|
the libraries on the command line.
|
||||||
this is a quick table of results:
|
ex_libs => Extra libraries that are needed when
|
||||||
|
linking.
|
||||||
"-foo%-bar" > -foo -lssl -lcrypto -bar
|
|
||||||
"-foo%" > -foo -lssl -lcrypto
|
|
||||||
"-foo" > -lssl -lcrypto -foo
|
|
||||||
|
|
||||||
debug_lflags => Like debug_cflags, but used when linking.
|
debug_lflags => Like debug_cflags, but used when linking.
|
||||||
release_lflags => Like release_cflags, but used when linking.
|
release_lflags => Like release_cflags, but used when linking.
|
||||||
shared_lflags => Like shared_cflags, but used when linking.
|
|
||||||
|
|
||||||
ar => The library archive command, the default is
|
ar => The library archive command, the default is
|
||||||
"ar".
|
"ar".
|
||||||
@ -253,6 +250,31 @@ In each table entry, the following keys are significant:
|
|||||||
be "(unknown)", in which case the user MUST give some compilation
|
be "(unknown)", in which case the user MUST give some compilation
|
||||||
flags to Configure.
|
flags to Configure.
|
||||||
|
|
||||||
|
[3] OpenSSL has three types of things to link from object files or
|
||||||
|
static libraries:
|
||||||
|
|
||||||
|
- shared libraries; that would be libcrypto and libssl.
|
||||||
|
- shared objects (sometimes called dynamic libraries); that would
|
||||||
|
be the engines.
|
||||||
|
- applications; those are apps/openssl and all the test apps.
|
||||||
|
|
||||||
|
Very roughly speaking, linking is done like this (words in braces
|
||||||
|
represent the configuration settings documented at the beginning
|
||||||
|
of this file):
|
||||||
|
|
||||||
|
shared libraries:
|
||||||
|
{ld} $(CFLAGS) {shared_ldflag} -shared -o libfoo.so \
|
||||||
|
-Wl,--whole-archive libfoo.a -Wl,--no-whole-archive \
|
||||||
|
{plib_lflags} -lcrypto {ex_libs}
|
||||||
|
|
||||||
|
shared objects:
|
||||||
|
{ld} $(CFLAGS) {shared_ldflag} -shared -o libeng.so \
|
||||||
|
blah1.o blah2.o {plib_lflags} -lcrypto {ex_libs}
|
||||||
|
|
||||||
|
applications:
|
||||||
|
{ld} $(CFLAGS) {lflags} -o app \
|
||||||
|
app1.o utils.o {plib_lflags} -lssl -lcrypto {ex_libs}
|
||||||
|
|
||||||
|
|
||||||
Historically, the target configurations came in form of a string with
|
Historically, the target configurations came in form of a string with
|
||||||
values separated by colons. This use is deprecated. The string form
|
values separated by colons. This use is deprecated. The string form
|
||||||
|
12
Configure
12
Configure
@ -820,7 +820,8 @@ $config{openssldir} = catdir($config{prefix}, $config{openssldir})
|
|||||||
# Allow environment CC to override compiler...
|
# Allow environment CC to override compiler...
|
||||||
$target{cc} = $ENV{CC} || $target{cc};
|
$target{cc} = $ENV{CC} || $target{cc};
|
||||||
|
|
||||||
# For cflags, lflags and ex_libs, add the debug_ or release_ attributes
|
# For cflags, lflags, plib_lflags and ex_libs, add the debug_ or release_
|
||||||
|
# attributes.
|
||||||
# Do it in such a way that no spurious space is appended (hence the grep).
|
# Do it in such a way that no spurious space is appended (hence the grep).
|
||||||
$config{cflags} = join(" ",
|
$config{cflags} = join(" ",
|
||||||
grep { $_ ne "" } ($target{cflags},
|
grep { $_ ne "" } ($target{cflags},
|
||||||
@ -828,6 +829,9 @@ $config{cflags} = join(" ",
|
|||||||
$config{lflags} = join(" ",
|
$config{lflags} = join(" ",
|
||||||
grep { $_ ne "" } ($target{lflags},
|
grep { $_ ne "" } ($target{lflags},
|
||||||
$target{$build_prefix."lflags"}));
|
$target{$build_prefix."lflags"}));
|
||||||
|
$config{plib_lflags} = join(" ",
|
||||||
|
grep { $_ ne "" } ($target{plib_lflags},
|
||||||
|
$target{$build_prefix."plib_lflags"}));
|
||||||
$config{ex_libs} = join(" ",
|
$config{ex_libs} = join(" ",
|
||||||
grep { $_ ne "" } ($target{ex_libs},
|
grep { $_ ne "" } ($target{ex_libs},
|
||||||
$target{$build_prefix."ex_libs"}));
|
$target{$build_prefix."ex_libs"}));
|
||||||
@ -1653,7 +1657,8 @@ EOF
|
|||||||
print "IsMK1MF =", ($target{build_scheme}->[0] eq "mk1mf" ? "yes" : "no"), "\n";
|
print "IsMK1MF =", ($target{build_scheme}->[0] eq "mk1mf" ? "yes" : "no"), "\n";
|
||||||
print "CC =$target{cc}\n";
|
print "CC =$target{cc}\n";
|
||||||
print "CFLAG =$config{cflags}\n";
|
print "CFLAG =$config{cflags}\n";
|
||||||
print "LFLAGS =$config{lflags}\n";
|
print "LFLAG =$config{lflags}\n";
|
||||||
|
print "PLIB_LFLAG =$config{plib_lflags}\n";
|
||||||
print "EX_LIBS =$config{ex_libs}\n";
|
print "EX_LIBS =$config{ex_libs}\n";
|
||||||
print "CPUID_OBJ =$target{cpuid_obj}\n";
|
print "CPUID_OBJ =$target{cpuid_obj}\n";
|
||||||
print "BN_ASM =$target{bn_obj}\n";
|
print "BN_ASM =$target{bn_obj}\n";
|
||||||
@ -2116,10 +2121,13 @@ sub print_table_entry
|
|||||||
"unistd",
|
"unistd",
|
||||||
"ld",
|
"ld",
|
||||||
"lflags",
|
"lflags",
|
||||||
|
"plib_lflags",
|
||||||
"ex_libs",
|
"ex_libs",
|
||||||
"debug_lflags",
|
"debug_lflags",
|
||||||
|
"debug_plib_lflags",
|
||||||
"debug_ex_libs",
|
"debug_ex_libs",
|
||||||
"release_lflags",
|
"release_lflags",
|
||||||
|
"release_plib_lflags",
|
||||||
"release_ex_libs",
|
"release_ex_libs",
|
||||||
"bn_ops",
|
"bn_ops",
|
||||||
"cpuid_obj",
|
"cpuid_obj",
|
||||||
|
10
Makefile.in
10
Makefile.in
@ -62,7 +62,8 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
|
|||||||
CC= $(CROSS_COMPILE){- $target{cc} -}
|
CC= $(CROSS_COMPILE){- $target{cc} -}
|
||||||
CFLAG= {- $config{cflags} -}
|
CFLAG= {- $config{cflags} -}
|
||||||
DEPFLAG= {- $config{depflags} -}
|
DEPFLAG= {- $config{depflags} -}
|
||||||
LDFLAGS= {- $config{lflags} -}
|
LDFLAG= {- $config{lflags} -}
|
||||||
|
PLIB_LDFLAG= {- $config{plib_lflags} -}
|
||||||
EX_LIBS= {- $config{ex_libs} -}
|
EX_LIBS= {- $config{ex_libs} -}
|
||||||
EXE_EXT= {- $target{exe_extension} -}
|
EXE_EXT= {- $target{exe_extension} -}
|
||||||
ARFLAGS= {- $target{arflags} -}
|
ARFLAGS= {- $target{arflags} -}
|
||||||
@ -159,7 +160,7 @@ LIBS= libcrypto.a libssl.a
|
|||||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||||
SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
|
SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
|
||||||
SHARED_LDFLAGS={- $target{shared_ldflag} -}
|
SHARED_LDFLAG={- $target{shared_ldflag} -}
|
||||||
|
|
||||||
GENERAL= Makefile
|
GENERAL= Makefile
|
||||||
BASENAME= openssl
|
BASENAME= openssl
|
||||||
@ -209,11 +210,12 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
|
|||||||
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
|
||||||
LIBDIR='$(LIBDIR)' \
|
LIBDIR='$(LIBDIR)' \
|
||||||
DEPFLAG='$(DEPFLAG)' \
|
DEPFLAG='$(DEPFLAG)' \
|
||||||
SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
|
SHARED_LDFLAG='$(SHARED_LDFLAG)' \
|
||||||
ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
|
ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
|
||||||
EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
|
EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
|
||||||
SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
|
SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
|
||||||
LDFLAGS='$(LDFLAGS)' EX_LIBS='$(EX_LIBS)' \
|
LDFLAG='$(LDFLAG)' \
|
||||||
|
PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)' \
|
||||||
CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
|
CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
|
||||||
EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
|
EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
|
||||||
AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
|
AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
|
||||||
|
@ -11,8 +11,8 @@ CFLAGS=$(CFLAG)
|
|||||||
# LDFLAGS contains flags to be used when temporary object files (when building
|
# LDFLAGS contains flags to be used when temporary object files (when building
|
||||||
# shared libraries) are created, or when an application is linked.
|
# shared libraries) are created, or when an application is linked.
|
||||||
# SHARED_LDFLAGS contains flags to be used when the shared library is created.
|
# SHARED_LDFLAGS contains flags to be used when the shared library is created.
|
||||||
LDFLAGS=
|
LDFLAGS=$(LDFLAG)
|
||||||
SHARED_LDFLAGS=
|
SHARED_LDFLAGS=$(SHARED_LDFLAG)
|
||||||
|
|
||||||
NM=nm
|
NM=nm
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ CALC_VERSIONS= \
|
|||||||
LINK_APP= \
|
LINK_APP= \
|
||||||
( $(SET_X); \
|
( $(SET_X); \
|
||||||
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
|
||||||
LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
|
LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS) $(LDFLAGS)}"; \
|
||||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||||
@ -153,7 +153,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
|
|||||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
|
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
|
||||||
|
|
||||||
DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
|
DO_GNU_APP=LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,-rpath,$(LIBRPATH)"
|
||||||
|
|
||||||
#This is rather special. It's a special target with which one can link
|
#This is rather special. It's a special target with which one can link
|
||||||
#applications without bothering with any features that have anything to
|
#applications without bothering with any features that have anything to
|
||||||
@ -203,7 +203,7 @@ link_a.bsd:
|
|||||||
fi; $(LINK_SO_A)
|
fi; $(LINK_SO_A)
|
||||||
link_app.bsd:
|
link_app.bsd:
|
||||||
@if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
|
@if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
|
||||||
LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBPATH)"; \
|
LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,-rpath,$(LIBPATH)"; \
|
||||||
fi; $(LINK_APP)
|
fi; $(LINK_APP)
|
||||||
|
|
||||||
# For Darwin AKA Mac OS/X (dyld)
|
# For Darwin AKA Mac OS/X (dyld)
|
||||||
@ -357,7 +357,7 @@ link_app.alpha-osf1:
|
|||||||
@if $(DETECT_GNU_LD); then \
|
@if $(DETECT_GNU_LD); then \
|
||||||
$(DO_GNU_APP); \
|
$(DO_GNU_APP); \
|
||||||
else \
|
else \
|
||||||
LDFLAGS="$(CFLAGS) -rpath $(LIBRPATH)"; \
|
LDFLAGS="$(CFLAGS) $(LDFLAGS) -rpath $(LIBRPATH)"; \
|
||||||
fi; \
|
fi; \
|
||||||
$(LINK_APP)
|
$(LINK_APP)
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ link_app.solaris:
|
|||||||
@ if $(DETECT_GNU_LD); then \
|
@ if $(DETECT_GNU_LD); then \
|
||||||
$(DO_GNU_APP); \
|
$(DO_GNU_APP); \
|
||||||
else \
|
else \
|
||||||
LDFLAGS="$(CFLAGS) -R $(LIBRPATH)"; \
|
LDFLAGS="$(CFLAGS) $(LDFLAGS) -R $(LIBRPATH)"; \
|
||||||
fi; \
|
fi; \
|
||||||
$(LINK_APP)
|
$(LINK_APP)
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ link_a.irix:
|
|||||||
fi; \
|
fi; \
|
||||||
$(LINK_SO_A)
|
$(LINK_SO_A)
|
||||||
link_app.irix:
|
link_app.irix:
|
||||||
@LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
|
@LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
|
||||||
$(LINK_APP)
|
$(LINK_APP)
|
||||||
|
|
||||||
# 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
|
# 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
|
||||||
@ -532,7 +532,7 @@ link_a.hpux:
|
|||||||
$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
||||||
link_app.hpux:
|
link_app.hpux:
|
||||||
@if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
|
@if $(DETECT_GNU_LD); then $(DO_GNU_APP); else \
|
||||||
LDFLAGS="$(CFLAGS) -Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
|
LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
|
||||||
fi; \
|
fi; \
|
||||||
$(LINK_APP)
|
$(LINK_APP)
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ link_a.aix:
|
|||||||
SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-bexpall,-bnolibpath,-bM:SRE'; \
|
SHAREDFLAGS='$(CFLAGS) $(SHARED_LDFLAGS) -Wl,-bexpall,-bnolibpath,-bM:SRE'; \
|
||||||
$(LINK_SO_A_VIA_O)
|
$(LINK_SO_A_VIA_O)
|
||||||
link_app.aix:
|
link_app.aix:
|
||||||
LDFLAGS="$(CFLAGS) -Wl,-brtl,-blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
|
LDFLAGS="$(CFLAGS) $(LDFLAGS) -Wl,-brtl,-blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
|
||||||
$(LINK_APP)
|
$(LINK_APP)
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ MAKEFILE= Makefile
|
|||||||
PERL= perl
|
PERL= perl
|
||||||
RM= rm -f
|
RM= rm -f
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
EXE_EXT=
|
EXE_EXT=
|
||||||
|
|
||||||
@ -131,7 +131,8 @@ $(EXE): progs.h $(EXE_OBJ) $(DLIBCRYPTO) $(DLIBSSL)
|
|||||||
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)" ; \
|
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)" ; \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
APPNAME=$(EXE) OBJECTS="$(EXE_OBJ)" \
|
APPNAME=$(EXE) OBJECTS="$(EXE_OBJ)" \
|
||||||
LIBDEPS="$(LDFLAGS) $$LIBRARIES $(EX_LIBS)" \
|
LDFLAG="$(LDFLAG)" \
|
||||||
|
LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
|
||||||
link_app.$${shlib_target}
|
link_app.$${shlib_target}
|
||||||
|
|
||||||
progs.h: progs.pl Makefile
|
progs.h: progs.pl Makefile
|
||||||
|
@ -18,7 +18,7 @@ RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
|
|||||||
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
|
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
|
|
||||||
CFLAGS= $(INCLUDE) $(CFLAG)
|
CFLAGS= $(INCLUDE) $(CFLAG)
|
||||||
|
@ -10,7 +10,7 @@ CFLAG=-g
|
|||||||
MAKEFILE= Makefile
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
|
@ -11,7 +11,7 @@ OPENSSLDIR= /usr/local/ssl
|
|||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
|
@ -15,7 +15,7 @@ AR= ar r
|
|||||||
|
|
||||||
PADLOCK_ASM_OBJ=
|
PADLOCK_ASM_OBJ=
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@ -62,7 +62,7 @@ lib: $(LIBOBJ) $(TESTLIBOBJ)
|
|||||||
for l in $(LIBNAMES) $(TESTLIBNAMES); do \
|
for l in $(LIBNAMES) $(TESTLIBNAMES); do \
|
||||||
$(MAKE) -f ../Makefile.shared -e \
|
$(MAKE) -f ../Makefile.shared -e \
|
||||||
LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
|
LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
|
||||||
LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
|
LIBDEPS='$(PLIB_LDFLAG) -L.. -lcrypto $(EX_LIBS)' \
|
||||||
link_o.$(SHLIB_TARGET); \
|
link_o.$(SHLIB_TARGET); \
|
||||||
done; \
|
done; \
|
||||||
else \
|
else \
|
||||||
|
@ -10,10 +10,11 @@ CFLAG= -g
|
|||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
PERL= perl
|
PERL= perl
|
||||||
|
|
||||||
LDFLAGS=
|
PLIB_LDFLAG=
|
||||||
EX_LIBS= #-lnsl -lsocket
|
EX_LIBS= #-lnsl -lsocket
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
|
LDFLAGS= $(CFLAGS) $(LDFLAG)
|
||||||
|
|
||||||
GENERAL=Makefile maketests.com \
|
GENERAL=Makefile maketests.com \
|
||||||
tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
|
tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
|
||||||
@ -182,14 +183,16 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
|||||||
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)"; \
|
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)"; \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o $$testutil" \
|
APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o $$testutil" \
|
||||||
LIBDEPS="$(LDFLAGS) $$LIBRARIES $(EX_LIBS)" \
|
LDFLAG="$(LDFLAG)" \
|
||||||
|
LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
|
||||||
link_app.$${shlib_target}
|
link_app.$${shlib_target}
|
||||||
|
|
||||||
BUILD_CMD_STATIC=shlib_target=; \
|
BUILD_CMD_STATIC=shlib_target=; \
|
||||||
LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO)"; \
|
LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO)"; \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o $$testutil" \
|
APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o $$testutil" \
|
||||||
LIBDEPS="$(LDFLAGS) $$LIBRARIES $(EX_LIBS)" \
|
LDFLAG="$(LDFLAG)" \
|
||||||
|
LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
|
||||||
link_app.$${shlib_target}
|
link_app.$${shlib_target}
|
||||||
|
|
||||||
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
|
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
|
||||||
@ -244,7 +247,8 @@ FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
|||||||
fi; \
|
fi; \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
CC="$${CC}" APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
CC="$${CC}" APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
||||||
LIBDEPS="$(LDFLAGS) $$LIBRARIES $(EX_LIBS)" \
|
LDFLAG="$(LDFLAG)" \
|
||||||
|
LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
|
||||||
link_app.$${shlib_target}
|
link_app.$${shlib_target}
|
||||||
|
|
||||||
FIPS_CRYPTO_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
FIPS_CRYPTO_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||||
@ -257,7 +261,8 @@ FIPS_CRYPTO_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
|||||||
[ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
|
[ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
|
||||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||||
CC="$${CC}" APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
CC="$${CC}" APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
||||||
LIBDEPS="$(LDFLAGS) $$LIBRARIES $(EX_LIBS)" \
|
LDFLAG="$(LDFLAG)" \
|
||||||
|
LIBDEPS="$(PLIB_LDFLAG) $$LIBRARIES $(EX_LIBS)" \
|
||||||
link_app.$${shlib_target}
|
link_app.$${shlib_target}
|
||||||
|
|
||||||
$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
|
$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
|
||||||
@ -368,16 +373,6 @@ $(ASYNCTEST)$(EXE_EXT): $(ASYNCTEST).o
|
|||||||
$(DTLSV1LISTENTEST)$(EXE_EXT): $(DTLSV1LISTENTEST).o
|
$(DTLSV1LISTENTEST)$(EXE_EXT): $(DTLSV1LISTENTEST).o
|
||||||
@target=$(DTLSV1LISTENTEST) $(BUILD_CMD)
|
@target=$(DTLSV1LISTENTEST) $(BUILD_CMD)
|
||||||
|
|
||||||
#$(AESTEST).o: $(AESTEST).c
|
|
||||||
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
|
|
||||||
|
|
||||||
#$(AESTEST)$(EXE_EXT): $(AESTEST).o $(DLIBCRYPTO)
|
|
||||||
# if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
|
|
||||||
# $(CC) -o $(AESTEST)$(EXE_EXT) $(CFLAGS) $(AESTEST).o $(LDFLAGS) $(DLIBCRYPTO) $(EX_LIBS) ; \
|
|
||||||
# else \
|
|
||||||
# $(CC) -o $(AESTEST)$(EXE_EXT) $(CFLAGS) $(AESTEST).o $(LDFLAGS) $(LIBCRYPTO) $(EX_LIBS) ; \
|
|
||||||
# fi
|
|
||||||
|
|
||||||
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
||||||
@target=dummytest; $(BUILD_CMD)
|
@target=dummytest; $(BUILD_CMD)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user