From 26e98beb8a987cdc69699aaffc5599926fb1b293 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Fri, 17 Aug 2018 20:33:44 -0700 Subject: [PATCH] allow OPENSSLDIR and ENGINESDIR CFLAGS to be controlled Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Andre McCurdy --- Configurations/unix-Makefile.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 034d93e..2310d12 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -156,6 +156,10 @@ LIBDIR={- # ENGINESDIR={- use File::Spec::Functions; catdir($prefix,$libdir,"engines-$sover") -} +# Intermediate variables so the values defined via CFLAGS can be controlled. +OE_DOPENSSLDIR=$(OPENSSLDIR) +OE_DENGINESDIR=$(ENGINESDIR) + # Convenience variable for those who want to set the rpath in shared # libraries and applications LIBRPATH=$(INSTALLTOP)/$(LIBDIR) @@ -174,7 +178,7 @@ HTMLSUFFIX=html CROSS_COMPILE= {- $config{cross_compile_prefix} -} CC= $(CROSS_COMPILE){- $target{cc} -} -CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -} +CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OE_DOPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(OE_DENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -} CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -} LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -} PLIB_LDFLAGS= {- $target{plib_lflags} -} -- 1.9.1