2002-10-12 01:42:30 +08:00
|
|
|
#
|
2006-02-04 09:45:59 +08:00
|
|
|
# OpenSSL/engines/Makefile
|
2002-10-12 01:42:30 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
DIR= engines
|
|
|
|
TOP= ..
|
|
|
|
CC= cc
|
|
|
|
INCLUDES= -I../include
|
|
|
|
CFLAG=-g
|
2005-03-30 21:05:57 +08:00
|
|
|
MAKEFILE= Makefile
|
2002-10-12 01:42:30 +08:00
|
|
|
AR= ar r
|
|
|
|
|
2016-02-17 21:38:36 +08:00
|
|
|
RECURSIVE_MAKE= [ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
|
|
|
|
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
|
|
|
|
$(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
|
|
|
|
done;
|
|
|
|
|
2016-01-26 05:23:42 +08:00
|
|
|
PADLOCK_ASM_OBJ=
|
2011-09-07 04:45:36 +08:00
|
|
|
|
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>
2016-02-05 18:47:14 +08:00
|
|
|
PLIB_LDFLAG=
|
2002-10-14 17:25:48 +08:00
|
|
|
EX_LIBS=
|
2005-05-09 08:27:37 +08:00
|
|
|
|
2016-02-20 05:02:41 +08:00
|
|
|
CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
|
2011-09-07 04:45:36 +08:00
|
|
|
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
2015-01-31 02:59:32 +08:00
|
|
|
AFLAGS= $(ASFLAGS)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
2002-12-05 09:42:14 +08:00
|
|
|
GENERAL=Makefile engines.com install.com engine_vector.mar
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
LIB=$(TOP)/libcrypto.a
|
2015-12-15 02:34:14 +08:00
|
|
|
LIBNAMES= padlock capi dasync
|
|
|
|
LIBSRC= \
|
2008-06-01 06:49:32 +08:00
|
|
|
e_padlock.c \
|
2015-02-14 07:25:33 +08:00
|
|
|
e_capi.c \
|
|
|
|
e_dasync.c
|
2015-12-15 02:34:14 +08:00
|
|
|
LIBOBJ= \
|
2012-03-20 04:20:41 +08:00
|
|
|
e_padlock.o \
|
2011-09-07 04:45:36 +08:00
|
|
|
e_capi.o \
|
2015-02-14 07:25:33 +08:00
|
|
|
e_dasync.o \
|
2016-01-26 05:23:42 +08:00
|
|
|
$(PADLOCK_ASM_OBJ)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
2015-08-10 17:46:27 +08:00
|
|
|
TESTLIBNAMES= ossltest
|
|
|
|
TESTLIBSRC= e_ossltest.c
|
|
|
|
TESTLIBOBJ= e_ossltest.o
|
|
|
|
|
2002-10-12 01:42:30 +08:00
|
|
|
SRC= $(LIBSRC)
|
|
|
|
|
2015-12-15 02:34:14 +08:00
|
|
|
HEADER= \
|
2015-06-16 19:59:37 +08:00
|
|
|
e_capi_err.c e_capi_err.h \
|
2015-02-14 07:25:33 +08:00
|
|
|
e_ossltest_err.c e_ossltest_err.h \
|
|
|
|
e_dasync_err.c e_dasync_err.h
|
2002-10-12 01:42:30 +08:00
|
|
|
|
2015-03-27 04:44:59 +08:00
|
|
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
top:
|
|
|
|
(cd ..; $(MAKE) DIRS=$(DIR) all)
|
|
|
|
|
2016-02-17 21:38:36 +08:00
|
|
|
all: lib subdirs
|
2002-10-12 01:42:30 +08:00
|
|
|
|
2015-08-10 17:46:27 +08:00
|
|
|
lib: $(LIBOBJ) $(TESTLIBOBJ)
|
2016-02-20 05:08:37 +08:00
|
|
|
@if [ "$(DYNAMIC_ENGINES)" = 1 ]; then \
|
2002-10-12 01:42:30 +08:00
|
|
|
set -e; \
|
2015-08-10 17:46:27 +08:00
|
|
|
for l in $(LIBNAMES) $(TESTLIBNAMES); do \
|
2005-06-23 08:03:26 +08:00
|
|
|
$(MAKE) -f ../Makefile.shared -e \
|
2011-09-07 04:45:36 +08:00
|
|
|
LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
|
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>
2016-02-05 18:47:14 +08:00
|
|
|
LIBDEPS='$(PLIB_LDFLAG) -L.. -lcrypto $(EX_LIBS)' \
|
2016-02-16 01:02:52 +08:00
|
|
|
link_dso.$(SHLIB_TARGET); \
|
2002-10-12 01:42:30 +08:00
|
|
|
done; \
|
|
|
|
else \
|
|
|
|
$(AR) $(LIB) $(LIBOBJ); \
|
|
|
|
$(RANLIB) $(LIB) || echo Never mind.; \
|
|
|
|
fi; \
|
2003-01-11 00:04:07 +08:00
|
|
|
touch lib
|
2002-10-12 01:42:30 +08:00
|
|
|
|
2011-09-07 04:45:36 +08:00
|
|
|
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) > $@
|
|
|
|
|
2016-02-17 21:38:36 +08:00
|
|
|
subdirs:
|
|
|
|
@target=all; $(RECURSIVE_MAKE)
|
|
|
|
|
2002-10-12 01:42:30 +08:00
|
|
|
files:
|
2005-03-30 21:05:57 +08:00
|
|
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
2016-02-17 21:38:36 +08:00
|
|
|
@target=files; $(RECURSIVE_MAKE)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
install:
|
2005-05-16 06:23:26 +08:00
|
|
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
2002-10-12 01:42:30 +08:00
|
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
|
|
set -e; \
|
2016-02-13 04:14:03 +08:00
|
|
|
$(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
|
2002-10-12 01:42:30 +08:00
|
|
|
for l in $(LIBNAMES); do \
|
2016-02-16 01:29:09 +08:00
|
|
|
cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
|
|
|
|
chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
|
|
|
|
mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
|
|
|
|
done; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
|
|
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
|
|
|
set -e; \
|
|
|
|
for l in $(LIBNAMES); do \
|
|
|
|
$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
|
2002-10-12 01:42:30 +08:00
|
|
|
done; \
|
|
|
|
fi
|
2016-02-17 21:38:36 +08:00
|
|
|
@target=install; $(RECURSIVE_MAKE)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
errors:
|
|
|
|
set -e; for l in $(LIBNAMES); do \
|
|
|
|
$(PERL) ../util/mkerr.pl -conf e_$$l.ec \
|
|
|
|
-nostatic -staticloader -write e_$$l.c; \
|
|
|
|
done
|
|
|
|
|
2016-01-19 00:50:36 +08:00
|
|
|
depend:
|
2016-02-18 20:17:15 +08:00
|
|
|
@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
|
2016-01-19 00:50:36 +08:00
|
|
|
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
clean:
|
2015-09-28 21:46:09 +08:00
|
|
|
rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
2016-02-17 21:38:36 +08:00
|
|
|
@target=clean; $(RECURSIVE_MAKE)
|
2002-10-12 01:42:30 +08:00
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|