c86ddbe613
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>
125 lines
3.3 KiB
Makefile
125 lines
3.3 KiB
Makefile
#
|
|
# OpenSSL/engines/Makefile
|
|
#
|
|
|
|
#The following engines have been disabled as they currently do not build
|
|
# sureware ubsec
|
|
|
|
DIR= engines
|
|
TOP= ..
|
|
CC= cc
|
|
INCLUDES= -I../include
|
|
CFLAG=-g
|
|
MAKEFILE= Makefile
|
|
AR= ar r
|
|
|
|
PADLOCK_ASM_OBJ=
|
|
|
|
PLIB_LDFLAG=
|
|
EX_LIBS=
|
|
|
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
|
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
|
AFLAGS= $(ASFLAGS)
|
|
|
|
GENERAL=Makefile engines.com install.com engine_vector.mar
|
|
|
|
LIB=$(TOP)/libcrypto.a
|
|
LIBNAMES= padlock capi dasync
|
|
LIBSRC= \
|
|
e_padlock.c \
|
|
e_capi.c \
|
|
e_dasync.c
|
|
LIBOBJ= \
|
|
e_padlock.o \
|
|
e_capi.o \
|
|
e_dasync.o \
|
|
$(PADLOCK_ASM_OBJ)
|
|
|
|
TESTLIBNAMES= ossltest
|
|
TESTLIBSRC= e_ossltest.c
|
|
TESTLIBOBJ= e_ossltest.o
|
|
|
|
SRC= $(LIBSRC)
|
|
|
|
HEADER= \
|
|
e_chil_err.c e_chil_err.h \
|
|
e_ubsec_err.c e_ubsec_err.h \
|
|
e_capi_err.c e_capi_err.h \
|
|
e_ossltest_err.c e_ossltest_err.h \
|
|
e_dasync_err.c e_dasync_err.h
|
|
|
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
|
|
|
top:
|
|
(cd ..; $(MAKE) DIRS=$(DIR) all)
|
|
|
|
all: lib
|
|
|
|
lib: $(LIBOBJ) $(TESTLIBOBJ)
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
set -e; \
|
|
for l in $(LIBNAMES) $(TESTLIBNAMES); do \
|
|
$(MAKE) -f ../Makefile.shared -e \
|
|
LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
|
|
LIBDEPS='$(PLIB_LDFLAG) -L.. -lcrypto $(EX_LIBS)' \
|
|
link_o.$(SHLIB_TARGET); \
|
|
done; \
|
|
else \
|
|
$(AR) $(LIB) $(LIBOBJ); \
|
|
$(RANLIB) $(LIB) || echo Never mind.; \
|
|
fi; \
|
|
touch lib
|
|
|
|
e_padlock-x86.s: asm/e_padlock-x86.pl
|
|
$(PERL) asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
|
e_padlock-x86_64.s: asm/e_padlock-x86_64.pl
|
|
$(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@
|
|
|
|
files:
|
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
|
|
|
# XXXXX This currently only works on systems that use .so as suffix
|
|
# for shared libraries as well as for Cygwin which uses the
|
|
# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
|
|
# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
|
|
# XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
|
|
install:
|
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
set -e; \
|
|
$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
|
|
for l in $(LIBNAMES); do \
|
|
( echo installing $$l; \
|
|
pfx=lib; \
|
|
if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
|
|
sfx=".so"; \
|
|
cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
|
else \
|
|
case "$(CFLAGS)" in \
|
|
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
|
|
*DSO_DL*) sfx=".sl";; \
|
|
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
|
|
*) sfx=".bad";; \
|
|
esac; \
|
|
cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
|
fi; \
|
|
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
|
done; \
|
|
fi
|
|
|
|
errors:
|
|
set -e; for l in $(LIBNAMES); do \
|
|
$(PERL) ../util/mkerr.pl -conf e_$$l.ec \
|
|
-nostatic -staticloader -write e_$$l.c; \
|
|
done
|
|
|
|
depend:
|
|
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
|
|
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
|
|
|
|
clean:
|
|
rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|