Add support for RC / WINDRES env variables
RT#2558 Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
3c01ed680e
commit
8f41ff2d53
3 changed files with 11 additions and 7 deletions
|
@ -169,7 +169,6 @@ LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
|
|||
# $prefix is not /usr.
|
||||
. ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
|
||||
? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
|
||||
RCFLAGS={- $target{shared_rcflag} -}
|
||||
DSO_CFLAGS={- $target{shared_cflag} || "" -}
|
||||
DSO_LDFLAGS=$(LIB_LDFLAGS)
|
||||
BIN_CFLAGS={- $target{bin_cflags} -}
|
||||
|
@ -180,6 +179,8 @@ ARFLAGS= {- $target{arflags} -}
|
|||
AR=$(CROSS_COMPILE){- $target{ar} || "ar" -} $(ARFLAGS) r
|
||||
RANLIB= {- $target{ranlib} -}
|
||||
NM= $(CROSS_COMPILE){- $target{nm} || "nm" -}
|
||||
RCFLAGS={- $target{shared_rcflag} -}
|
||||
RC= $(CROSS_COMPILE){- $target{rc} || "windres" -}
|
||||
RM= rm -f
|
||||
RMDIR= rmdir
|
||||
TAR= {- $target{tar} || "tar" -}
|
||||
|
@ -959,9 +960,9 @@ $target: $lib$libext $deps $ordinalsfile
|
|||
LIBNAME=$libname LIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
|
||||
LIBCOMPATVERSIONS=';\$(SHLIB_VERSION_HISTORY)' \\
|
||||
CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(LIB_CFLAGS)' \\
|
||||
CROSS_COMPILE='\$(CROSS_COMPILE)' LDFLAGS='\$(LDFLAGS)' \\
|
||||
LDFLAGS='\$(LDFLAGS)' \\
|
||||
SHARED_LDFLAGS='\$(LIB_LDFLAGS)' SHLIB_EXT=$shlibext \\
|
||||
SHARED_RCFLAGS='\$(RCFLAGS)' \\
|
||||
RC='\$(RC)' SHARED_RCFLAGS='\$(RCFLAGS)' \\
|
||||
link_shlib.$shlib_target
|
||||
EOF
|
||||
. (windowsdll() ? <<"EOF" : "");
|
||||
|
|
|
@ -915,6 +915,8 @@ $target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} ||
|
|||
"\$(CROSS_COMPILE)ranlib" : "true");
|
||||
$target{ar} = $ENV{'AR'} || $target{ar} || "ar";
|
||||
$target{nm} = $ENV{'NM'} || $target{nm} || "nm";
|
||||
$target{rc} =
|
||||
$ENV{'RC'} || $ENV{'WINDRES'} || $target{rc} || "windres";
|
||||
|
||||
# For cflags, lflags, plib_lflags, ex_libs and defines, add the debug_
|
||||
# or release_ attributes.
|
||||
|
|
|
@ -14,6 +14,7 @@ CFLAGS=$(CFLAG)
|
|||
LDFLAGS=$(LDFLAG)
|
||||
SHARED_LDFLAGS=$(SHARED_LDFLAG)
|
||||
|
||||
RC=windres
|
||||
# SHARED_RCFLAGS are flags used with windres, i.e. when build for Cygwin
|
||||
# or Mingw.
|
||||
SHARED_RCFLAGS=$(SHARED_RCFLAG)
|
||||
|
@ -278,9 +279,9 @@ link_shlib.cygwin:
|
|||
SHLIB=cyg$(LIBNAME); SHLIB_SOVER=-$(LIBVERSION); SHLIB_SUFFIX=.dll; \
|
||||
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
|
||||
echo "$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name |" \
|
||||
"$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o"; \
|
||||
"$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
|
||||
$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
|
||||
$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
|
||||
$(RC) $(SHARED_RCFLAGS) -o rc.o; \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,--enable-auto-image-base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a rc.o"; \
|
||||
|
@ -306,9 +307,9 @@ link_shlib.mingw:
|
|||
| sed -e 's|^\(LIBRARY *\)$(LIBNAME)32|\1'"$$dll_name"'|' \
|
||||
> $(LIBNAME).def; \
|
||||
echo "$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name |" \
|
||||
"$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o"; \
|
||||
"$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
|
||||
$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
|
||||
$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
|
||||
$(RC) $(SHARED_RCFLAGS) -o rc.o; \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a $(LIBNAME).def rc.o"; \
|
||||
|
|
Loading…
Reference in a new issue