]> git.ipfire.org Git - thirdparty/openssl.git/blob - engines/Makefile.in
Templatize util/domd
[thirdparty/openssl.git] / engines / Makefile.in
1 #
2 # OpenSSL/engines/Makefile
3 #
4
5 #The following engines have been disabled as they currently do not build
6 # sureware ubsec
7
8 DIR= engines
9 TOP= ..
10 CC= cc
11 INCLUDES= -I../include
12 CFLAG=-g
13 MAKEFILE= Makefile
14 AR= ar r
15
16 PADLOCK_ASM_OBJ=
17
18 LDFLAGS=
19 EX_LIBS=
20
21 CFLAGS= $(INCLUDES) $(CFLAG)
22 ASFLAGS= $(INCLUDES) $(ASFLAG)
23 AFLAGS= $(ASFLAGS)
24
25 GENERAL=Makefile engines.com install.com engine_vector.mar
26
27 LIB=$(TOP)/libcrypto.a
28 LIBNAMES= padlock capi dasync
29 LIBSRC= \
30 e_padlock.c \
31 e_capi.c \
32 e_dasync.c
33 LIBOBJ= \
34 e_padlock.o \
35 e_capi.o \
36 e_dasync.o \
37 $(PADLOCK_ASM_OBJ)
38
39 TESTLIBNAMES= ossltest
40 TESTLIBSRC= e_ossltest.c
41 TESTLIBOBJ= e_ossltest.o
42
43 SRC= $(LIBSRC)
44
45 HEADER= \
46 e_chil_err.c e_chil_err.h \
47 e_ubsec_err.c e_ubsec_err.h \
48 e_capi_err.c e_capi_err.h \
49 e_ossltest_err.c e_ossltest_err.h \
50 e_dasync_err.c e_dasync_err.h
51
52 ALL= $(GENERAL) $(SRC) $(HEADER)
53
54 top:
55 (cd ..; $(MAKE) DIRS=$(DIR) all)
56
57 all: lib
58
59 lib: $(LIBOBJ) $(TESTLIBOBJ)
60 @if [ -n "$(SHARED_LIBS)" ]; then \
61 set -e; \
62 for l in $(LIBNAMES) $(TESTLIBNAMES); do \
63 $(MAKE) -f ../Makefile.shared -e \
64 LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
65 LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
66 link_o.$(SHLIB_TARGET); \
67 done; \
68 else \
69 $(AR) $(LIB) $(LIBOBJ); \
70 $(RANLIB) $(LIB) || echo Never mind.; \
71 fi; \
72 touch lib
73
74 e_padlock-x86.s: asm/e_padlock-x86.pl
75 $(PERL) asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
76 e_padlock-x86_64.s: asm/e_padlock-x86_64.pl
77 $(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@
78
79 files:
80 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
81
82 # XXXXX This currently only works on systems that use .so as suffix
83 # for shared libraries as well as for Cygwin which uses the
84 # dlfcn_name_converter and therefore stores the engines with .so suffix, too.
85 # XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
86 # XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
87 install:
88 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
89 @if [ -n "$(SHARED_LIBS)" ]; then \
90 set -e; \
91 $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
92 for l in $(LIBNAMES); do \
93 ( echo installing $$l; \
94 pfx=lib; \
95 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
96 sfx=".so"; \
97 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
98 else \
99 case "$(CFLAGS)" in \
100 *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
101 *DSO_DL*) sfx=".sl";; \
102 *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
103 *) sfx=".bad";; \
104 esac; \
105 cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
106 fi; \
107 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
108 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
109 done; \
110 fi
111
112 errors:
113 set -e; for l in $(LIBNAMES); do \
114 $(PERL) ../util/mkerr.pl -conf e_$$l.ec \
115 -nostatic -staticloader -write e_$$l.c; \
116 done
117
118 depend:
119 @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
120 @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
121
122 clean:
123 rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
124
125 # DO NOT DELETE THIS LINE -- make depend depends on it.