Commit 64c443e3 authored by Richard Levitte's avatar Richard Levitte
Browse files

Add support for shared_rcflag, useful for windres (Cygwin and Mingw)



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 68ab559a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
	shared_target	=> "",
	shared_cflag	=> "",
	shared_ldflag	=> "",
	shared_rcflag	=> "",
	shared_extension	=> "",
	build_scheme	=> "unixmake",
	build_file      => "Makefile",
+2 −0
Original line number Diff line number Diff line
@@ -1174,6 +1174,7 @@
        shared_target    => "cygwin-shared",
        shared_cflag     => "-D_WINDLL -DOPENSSL_USE_APPLINK",
        shared_ldflag    => "-static-libgcc",
        shared_rcflag    => "--target=pe-i386",
        shared_extension => ".dll",
    },
    "mingw64" => {
@@ -1199,6 +1200,7 @@
        shared_target    => "cygwin-shared",
        shared_cflag     => "-D_WINDLL",
        shared_ldflag    => "-static-libgcc",
        shared_rcflag    => "--target=pe-x86-64",
        shared_extension => ".dll",
    },

+1 −0
Original line number Diff line number Diff line
@@ -2180,6 +2180,7 @@ sub print_table_entry
	"shared_target",
	"shared_cflag",
	"shared_ldflag",
	"shared_rcflag",
	"shared_extension",
	"obj_extension",
	"exe_extension",
+2 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ SHARED_LDFLAG={- $target{shared_ldflag}
                 # $prefix is not /usr.
                 . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
                    ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
SHARED_RCFLAG={- $target{shared_rcflag} -}

GENERAL=        Makefile
BASENAME=       openssl
@@ -255,6 +256,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
		LIBDIR='$(LIBDIR)'				\
		DEPFLAG='$(DEPFLAG)'                    	\
		SHARED_LDFLAG='$(SHARED_LDFLAG)'		\
		SHARED_RCFLAG='$(SHARED_RCFLAG)'		\
		ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)'	\
		EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'	\
		SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)'	\
+5 −1
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ CFLAGS=$(CFLAG)
LDFLAGS=$(LDFLAG)
SHARED_LDFLAGS=$(SHARED_LDFLAG)

# SHARED_RCFLAGS are flags used with windres, i.e. when build for Cygwin
# or Mingw.
SHARED_RCFLAGS=$(SHARED_RCFLAG)

NM=nm

# LIBNAME contains just the name of the library, without prefix ("lib"
@@ -305,7 +309,7 @@ link_a.cygwin:
	fi; \
	dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
	$(PERL) util/mkrc.pl $$dll_name | \
		$(CROSS_COMPILE)windres -o rc.o; \
		$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
	extras="$$extras rc.o"; \
	ALLSYMSFLAGS='-Wl,--whole-archive'; \
	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \